Home > Code > ASP.NET > Error page configuration in web.config file.

Error page configuration in web.config file.

by Narain Siddharth   on Jan 16, 2011   Category: ASP.NET   |  Views: 1212    |  Points: 25   |  Silver 

Below is the sample code for the custom error page configuration in the web.config file.

<customErrors mode="On" defaultRedirect="AppError.aspx">
<error statusCode="400" redirect="BadRequest.aspx" />
<error statusCode="401" redirect="AppUnauthorized.aspx" />
<error statusCode="404" redirect="AppPageNotFound.aspx" />
<error statusCode="408" redirect="RequestTimeOut.aspx" />
<error statusCode="500" redirect="AppServerError.aspx" />

Post Code  |  Code Snippet Home

User Responses

No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts