Check this out: Implementing a Custom Error page on an ASP.Net website
Also, it looks like you're missing ".aspx" at the end of your page paths.
题
Getting internal server error... want to redirect page on error "404 Page not found".
<?xml version="1.0"?>
<configuration>
<system.web>
<urlMappings enabled="true">
<add url="~/Error404" mappedUrl="~/Error404.aspx"/>
</urlMappings>
<pages controlRenderingCompatibilityVersion="4.0"/>
<customErrors mode="on" defaultRedirect="~/Error404">
<error statusCode="404" redirect="~/Error404" />
<error statusCode="500" redirect="~/Error404" />
</customErrors>
</system.web>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="/Error404" responseMode="ExecuteURL"/>
</httpErrors>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
没有正确的解决方案
其他提示
Check this out: Implementing a Custom Error page on an ASP.Net website
Also, it looks like you're missing ".aspx" at the end of your page paths.