According to Microsoft's documentation , for static (i.e. HTML) content, web.config should read responseMode="File" for each error.
Currently my web.config includes
<httpErrors errorMode="Custom"> <error statusCode="404" path="/error/404.html" responseMode="ExecuteURL" /> </httpErrors>
This returns the correct user error page, but returns a 200 OK status code.
When I change "ExecuteURL" to "File", my server returns 404, but the user error page does not appear. Instead, I get the message "The resource you are looking for has been deleted, its name has changed or is temporarily unavailable."
How should web.config read in order to return a static file, but also 404?
Edit: remove <customErrors> issues after examining what this tag is for IIS <= 6.0
Trojan
source share