In my web.config I have:
<customErrors mode="On" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite">
<error statusCode="500" redirect="~/Error.aspx" />
<error statusCode="404" redirect="~/404.aspx" />
</customErrors>
Yet with these URL's, only the 2nd one with file extension defined works, the other one returns the blue screen 404 "Server Error in Application".
http://127.0.0.1/scirranew/invalidpath
http://127.0.0.1/scirranew/invalidpath.aspx
Any ideas? I'm on ASP.net 4, IIS 7.5.