HTTP Error Messages Page

You can configure Internet Information Services (IIS) to send custom error messages instead of the default HTTP 1.1 error messages. These custom error messages can be mapped to a file name or to a URL.

HTTP 1.1 Error Messages

HTTP 1.1 error messages are returned to the client browser in the form of an HTML page that contains a generic message. When a user attempts to connect to a Web site and an HTTP error occurs, an error message is sent back to the client browser with a brief description of what happened during the attempt to establish a connection. For example, if a user attempts to connect to a Web site that has reached its maximum connection capacity, an HTTP error is returned to the client that contains the statement "Too many users."

Custom Error Messages

All IIS custom error messages display industry-standard HTTP codes, which ensure consistency with HTTP 1.1 error messages. However, you can use the Custom IIS Errors Pages functionality to customize generic HTTP error messages.

You can choose to provide a more informative or "friendly," feedback than default HTTP 1.1 error messages. For example, the default HTTP 1.1 404 error message that contains the statement "Object Not Found." can be expanded to: "The Web server cannot find the file/script you asked for. Please check the URL to ensure that the path is correct. Please contact the server's administrator if this problem persists."

Caution!When a set of custom error messages is configured at the Web Site level, all directories under that server inherit the entire list of custom error messages. The two custom error message lists (for the server and the directory) are not merged.

Error Codes

The following HTTP error messages can be customized with IIS:

Error CodeError Definition
400Cannot resolve the request.
401.1Unauthorized: Access is denied due to invalid credentials.
401.2Unauthorized: Access is denied due to server configuration favoring an alternate authentication method.
401.3Unauthorized: Access is denied due to an ACL set on the requested resource.
401.4Unauthorized: Authorization failed by a filter installed on the Web server.
401.5Unauthorized: Authorization failed by an ISAPI/CGI application.
401.7Unauthorized: Access denied by URL authorization policy on the Web server.
403Forbidden: Access is denied.
403.1Forbidden: Execute access is denied.
403.2Forbidden: Read access is denied.
403.3Forbidden: Write access is denied.
403.4Forbidden: SSL is required to view this resource.
403.5Forbidden: SSL 128 is required to view this resource.
403.6Forbidden: IP address of the client has been rejected.
403.7Forbidden: SSL client certificate is required.
403.8Forbidden: DNS name of the client is rejected.
403.9Forbidden: Too many clients are trying to connect to the Web server.
403.10Forbidden: Web server is configured to deny Execute access.
403.11Forbidden: Password has been changed.
403.12Forbidden: Client certificate is denied access by the server certificate mapper.
403.13Forbidden: Client certificate has been revoked on the Web server.
403.14Forbidden: Directory listing is denied on the Web server.
403.15Forbidden: Client access licenses have exceeded limits on the Web server.
403.16Forbidden: Client certificate is ill-formed or is not trusted by the Web server.
403.17Forbidden: Client certificate has expired or is not yet valid.
403.18Forbidden: Cannot execute requested URL in the current application pool.
403.19Forbidden: Cannot execute CGIs for the client in this application pool.
403.20Forbidden: Passport logon failed.
404File or directory not found.
404.1File or directory not found: Web site not accessible on the requested port.
404.2File or directory not found: Lockdown policy prevents this request.
404.3File or directory not found: MIME map policy prevents this request.
405HTTP verb used to access this page is not allowed.
406Client browser does not accept the MIME type of the requested page.
407Initial proxy authentication required by the Web server.
410File has been removed.
412Precondition set by the client failed when evaluated on the Web server.
414Request URL is too large and therefore unacceptable on the Web server.
415Unsupported Media Type.
500Internal server error.
500.11Server error: Application is shutting down on the Web server.
500.12Server error: Application is busy restarting on the Web server.
500.13Server error: Web server is too busy.
500.14Server error: Invalid application configuration on the server.
500.15Server error: Direct requests for GLOBAL.ASA are not allowed.
500.16Server error: UNC authorization credentials incorrect.
500.17Server error: URL authorization store cannot be found.
500.18Server error: URL authorization store cannot be opened.
500.19Server error: Data for this file is configured improperly in the metabase.
500.20Server error: URL authorization scope cannot be found.
500.100Internal server error: ASP error.
501Header values specify a configuration that is not implemented.
502Web server received an invalid response while acting as a gateway or proxy server.

NoteThe 404.1 error can occur only on computers with multiple IP addresses. If a specific IP address/port combination receives a client request, and the IP address is not configured to listen on that particular port, IIS returns a 404.1 HTTP error. For example, if a computer has two IP addresses and only one of those IP addresses is configured to listen on port 80, any requests received on the other IP address with port 80 result in IIS returning a 404.1 error. This error should be set only at the service level because it is returned to clients only when multiple IP addresses are used on the server.

Enabling ASP Error Processing by mapping to a URL

By default, the Default Web Site and all of its applications transfer the processing of Active Server Pages (ASP) errors to the 500-100.asp file. However, any new Web Site that you create or its applications, transfers the processing of 500-100 errors to the default, and not to a custom error file. If you want to develop additional error processing for .asp files, you can do so by either mapping the 500-100 error to the 500-100.asp file or by creating an error-processing .asp file of your own.

The 500-100.asp file processes any errors that occur during compilation or running of .asp files. When an ASP error occurs, IIS returns the 500-100.asp file with detailed information about the error, such as the line number in which the error occurred and a description of the error.

NoteIf the 500-100.asp file itself contains ASP errors, ASP does not return another 500-100.asp file. Instead, the error will be reported as if no custom error file exists for 500-100 errors. If the error-processing file (by default, 500-100.asp) contains run-time errors, only this error is displayed, regardless of the type of error in the requested .asp file. Finally, if the error-handling file has preprocessor or compilation errors, both errors are displayed in the browser (the error from the 500-100.asp file and the error in the requested .asp file).

If you have an ASP page defined to handle a custom error, the script is invoked as a URL that passes the context. For example, if you have a file called handle405.asp that is defined to handle HTTP 405 errors, and a 405 error occurs when a user tries to access example.html, the handle405.asp file is invoked as if the user had typed the following:

http://example.com/handle405.asp?405;http://example.com/example.html

NoteIf you develop an application using Internet Server API (ISAPI) or Active Server Pages (ASP) to handle errors, you should customize an error message by mapping to a URL. Note that the error status is handed to the application in the URL parameters, and the application must set the HTTP header status. Otherwise, the HTTP response status is "HTTP 1.1 200 OK."