문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top