Custom Errors Tab, ASP.NET Configuration Settings Dialog Box
When an error occurs in an ASP.NET Web page or component, ASP.NET raises an error code. Errors can include the following types:
Compile-time.
Parser (malformed ASP.NET elements).
Configuration.
Run-time.
NoteThe MMC snap-in for ASP.NET works with IIS 6.0 or earlier. The IIS 7.0 administration tool includes the functionality of the ASP.NET MMC tool. For more information, see ASP.NET and IIS Configuration.
By default, ASP.NET dynamically generates an error page that contains a description of the error, the name of the page on which the error occurred, and a stack trace. If debug mode is enabled, the dynamically generated page also includes an excerpt of the source code where the error originated. By defining custom errors, you can specify how the Web application responds when an error occurs.
Note |
|---|
For detailed information about debugging mode, see Application Tab, ASP.NET Configuration Settings Dialog Box. |
To display the Custom Errors tab of the ASP.NET Configuration Settings dialog box
In Microsoft Windows, open Administrative Tools, and then click Internet Information Services (IIS) Manager.
IIS Manager appears.
Under Internet Information Services, expand Servername (local computer), expand Web Sites, right-click either Websitename or Default Website, and then click Properties.
The Web Site Properties dialog box appears.
Click the ASP.NET tab, and then click Edit Configuration.
The ASP.NET Configuration Settings dialog box appears.
Click the Custom Errors tab.
The Custom Errors tab lets you complete the following tasks:
Specify a default error page to display when an ASP.NET error occurs anywhere in the Web application.
Map specific HTTP error codes to corresponding error pages.
NoteMappings work only for errors that ASP.NET is notified of. For example, by default, ASP.NET is not notified of HTTP 404 errors (page not found). If you want ASP.NET to receive these errors, you can set the Web site properties to map HTTP errors to .aspx pages.
Specify whether custom error pages are displayed for all users, no users, or remote (non-administrative) users.