Looking for the v10 manual? Visit our new user's guide!
Search Descriptions Version
This article applies to: ML v7, ML8, MultiStore

How To Enable Friendly Error Messages

When there is an error on your site it displays a .NET error message with a stack trace and technical jargon, but you want to display a friendly error message

Create an .html file (eg. custom_error.html) with whatever content you wish to display on the page whenever an error occurs and then upload it to the root directory of your site.  In your web.config file set the line:

<customErrors mode="Off"/>


<customErrors mode="On" defaultRedirect="custom_error.html"/>

This html page will now display whenever a hard error is thrown on the site.  If you do not set the defaultRedirect attribute, then you will get a generic error message that says you must turn customErrors off in order to view the error message.

More Information
You can take this a step further and assign custom error files to common errors in IIS
IIS 5: http://technet.microsoft.com/en-us/library/bb727138.aspx
IIS 6: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/80cb8d8d-8fd8-4af5-bb3b-4d11fff3ab9c.mspx?mfr=true