Live Chat Icon For mobile
Live Chat Icon

How to redirect the user to the friendly error-handler page when an Application error occurs

Platform: ASP.NET| Category: Error Handling

Modify web.config as


<customErrors mode='On' defaultRedirect='errorpage.aspx' />

The <customErrors> configuration section supports an inner <error> tag that associates HTTP status codes with custom error pages. For example:


<customErrors mode='On' defaultRedirect='genericerror.htm'>
	<error statusCode='404' redirect='pagenotfound.aspx'/>
	<error statusCode='403' redirect='noaccess.aspx'/>
</customErrors>

For more details refer <customErrors> Element

Share with

Share on twitter
Share on facebook
Share on linkedin