IIS 404 custom error
- by Greg B
I've deployed an ASP.NET 3.5 app to a 64bit Windows 2003 R2 server.
In the web.config I have the following
<customErrors mode="RemoteOnly"
defaultRedirect="/404/">
<error statusCode="404"
redirect="/404/"/>
<error statusCode="500"
redirect="/500/"/>
</customErrors>
In the website properties in IIS Manager I have set the 404 and 500 errors to Type = "URL" and the same URLs as in the web.config.
I have a wildcard application map to the .NET 2.0 aspnet_isapi.dll with "Verify file exists" turned off.
If I try to hit a fake .aspx file I successfully get sent to the 404 page. I belive this is because there is an explicit mapping for .aspx to the .NET DLL.
If I try to access a fake directory I simply recieve a plain text response saying:
The system cannot find the file specified.
It would appear that these requests for directories are not being routed through the .NET pipeline, which is what I would expect (and need) to happen becuase of the wildcard application mapping.
Any ideas?