I have a aspnetcore 3.1.10 website hosted on windows server 2019 and IIS v10.
It runs InProcess mode.
Static files (js or css) are processed by aspnetcore's StaticFileMiddleware.
Resently, IIS sometimes returned an empty content css or js with http status code 200, and there is no process log in StaticFileMiddleware.
Normally there is log "Sending file. Request path: '"/styles/css/main.css"'. Physical path: '"D:IISXXXXXwwwrootstylescssmain.css"'"
I didn't find any errors in aspnetcore logs or event viewer.
Only I can do is restarting IIS to make this issue disappeared for a while, how do I find out what's wrong with my website.
question from:
https://stackoverflow.com/questions/65622957/iis-didnt-send-static-file-reqest-to-aspnetcore 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…