Edit/Add Custom Error Handlers Dialog Box
The Edit/Add Custom Error Handlers dialog box lets you map an error code to a specific error page. When ASP.NET generates the error code, it displays the specified page.
The settings that you make in the Edit/Add Custom Error Handlers dialog box apply to the Web application that you select before opening the Properties dialog box.
Note
Configuration settings can be inherited. Settings can be defined in the Machine.config file, which acts as the base configuration for all Web sites and applications that are on the server. You can create new settings or override inherited settings by making configuration settings at the Web application level.
To open the Edit/Add Custom Error Handlers 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 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 Custom Errors.
To add a custom error handler, click Add.
To edit a custom error handler, click Edit.
The Edit/Add Custom Error Handlers dialog box appears.
Note
ASP.NET does not receive certain error codes, such as 404. You can map only errors that are generated internally in ASP.NET.
UI Elements
- Status code
Type the HTTP error code to map to an error page.
Redirect URL
Type the URL of the page for ASP.NET to display in response to the error code. The page that you reference does not have to be in the current Web site.Note
ASP.NET does not validate the URL that you enter.
- OK
Click to save the custom error handler.
- Cancel
Click to cancel changes.
See Also
Reference
Custom Errors Tab, ASP.NET Configuration Settings Dialog Box