Share via


.NET Error Pages

 

Applies To: Windows Server 2012 R2, Windows Server 2012

Use the .NET Error Pages feature to configure HTTP error responses to return when errors occur. You can create custom error pages or detailed error messages that contain troubleshooting information.

Related scenarios

In this document

UI Elements for .NET Error Pages

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

Feature Page Elements

Element Name

Description

Group by

Use this drop-down list to sort your error pages by No Grouping or Entry Type. This helps you find certain error pages easily, such as the Local entry type.

Status Code

Lists the status code for the .NET error page.

Redirect

Lists the URL address for the .NET error page to which the user is redirected when an error occurs.

Entry Type

Lists the entry type for the .NET error page.

Actions Pane Elements

Element Name

Description

Add

Opens the Add Custom Error Page dialog box that lets you configure an error page. Enter the status code and URL to which the user is redirected when an error occurs.

Edit

Opens the Edit Custom Error Page dialog box that lets you change the URL for the selected error page. You can change the status code by using the Change Status Code option in the Actions pane.

Edit Feature Settings

Opens the Edit Error Pages Settings dialog box that lets you configure the mode and default page properties for all error pages. For more information, see Edit ASP.NET Error Pages Settings Dialog Box.

Change Status Code

Allows you to change the status code for the selected error page.

Remove

Removes the selected error page.

Add or Edit Custom Error Page Dialog Box

Use the Add Custom Error Page and Edit Custom Error Page dialog boxes to add or edit the status code and URL for your error pages.

For more information, see the .NET Error Pages [w8] topic.

Element Name

Description

Status Code

Enter the status code for your error page. You cannot edit the status code by using the Edit Custom Error Page dialog box. Use the Change Status Code option in the Actions pane instead.

Absolute URL

Enter the URL address to which you want to redirect users when an error occurs.

Edit ASP.NET Error Pages Settings Dialog Box

Use the Edit Error Pages Settings dialog box to configure the mode and default page properties for your error pages. These settings affect all error pages. For more information, see .NET Error Pages [w8].

Element Name

Description

Mode

Select a mode for the error pages: On, Off, or Remote Only.

Redirect Mode

Select a mode for response redirection: ResponseRedirect or ResponseRewrite. ResponseRedirect causes the browser to redirect the client to a different URL. ResponseRewrite modifies the request URL before it is returned to the client. The default is ResponseRedirect.

Default Page

Absolute URL specifies the default URL address to which to direct a browser, if an error occurs. If this attribute is not specified, you receive a generic error message instead.

The URL can be absolute or relative. An example of an absolute URL is www.contoso.com/ErrorPage.htm. A relative URL, such as /ErrorPage.htm, is relative to the Web.config file that specified the URL for this attribute, not to the webpage in which the error occurred. A URL starting with a tilde (~), such as ~/ErrorPage.htm, indicates that the specified URL is relative to the root path of the application.

Miscellaneous

Select Allow Nested Errors to specify whether additional error information is displayed in browsers when a server-side error occurs during processing of an HTTP redirect for a custom error. The default is False.