httpErrors Element [IIS Settings Schema]
Note
For more information about the httpErrors element, see the following topic on the Microsoft IIS.net Web site: HTTP Errors <httpErrors>.
Configures HTTP error messages for a Web server.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
||||||||
---|---|---|---|---|---|---|---|---|---|
defaultPath |
Optional string attribute. Specifies the default path of the custom error page. The type of path is determined by the defaultResponseMode attribute. If you choose File, the file path is returned. If you choose either the ExecuteURL or Redirect path type, the URL of the custom error page is returned. |
||||||||
defaultResponseMode |
Optional enum attribute. Specifies how custom error content is returned. The defaultResponseMode attribute can be one of the following possible values. The default is File.
|
||||||||
detailedMoreInformationLink |
Optional string attribute. Specifies a link, shown at the bottom of the page, to a page with more detailed information about a particular error. You can use this property to point end users to a custom location for error information. The status, sub-status, hresult and message ID are sent as part of the query string. The default value is "https://go.microsoft.com/fwlink/?LinkID=62293". |
||||||||
errorMode |
Optional enum attribute. Specifies whether HTTP errors are enabled. The errorMode attribute can be one of the following values. The default is DetailedLocalOnly.
|
||||||||
existingResponse |
Optional enum attribute. Specifies what happens to an existing response when the HTTP status code is an error, i.e. response codes >= 400.
|
Child Elements
Element |
Description |
---|---|
error |
Optional element. Adds an HTTP error to the collection of HTTP errors. |
remove |
Optional element. Removes a reference to an HTTP error from the HTTP error collection. |
clear |
Optional element. Removes all references to HTTP errors from the HTTP error collection. |
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the top-level section group (in ApplicationHost.config) in which this element is defined. |
Remarks
For more information about the httpErrors element, see the following topic on the Microsoft IIS.net Web site: HTTP Errors <httpErrors>.
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root application Web.config Application Web.config Directory Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |