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'/>

For more details refer <customErrors> Element

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.