Friday, June 3, 2011

404 error page not found

Implement 404 functionality in ASP.NET

<customErrors mode="On" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>

<configuration>
<system.webServer>
<httpErrors errorMode="Custom" >
<remove statusCode = "404" subStatusCode="-1" />
<error statusCode = "404" prefixLanguageFilePath="" path="FileNotFound.htm" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.