How to configure friendly error pages in ASP.Net
Release 1.02 - ...
ASP.Net friendly error pages can be defined in the Web.config file. A typical example looks like this.
XML | Copy Code |
---|---|
<customErrors defaultRedirect="/Error.html" mode="RemoteOnly"> <error statusCode="500" redirect="/InternalError.html" /> </customErrors> |
In this example there is an error page for ASP.Net status 500 errors (/InternalError.htm) and a default redirect for all other ASP.Net errors (/Error.html).
Note that ASP.Net is not channel aware (unlike Smartsite). Therefore the configured error pages are generic for the site.
Make sure you don't use an url that has a querystring. If Asp.Net encounters an url with a querystring, it will not add the aspxerrorpath querystring parameter. For a complete reference, check the Microsoft site.