Web Site Properties - Error Messages Property Sheet

TheError Messagesproperty sheet lists what is returned to the browser in the event of an HTTP error. Administrators have the option of using the default HTTP 1.1 errors or customizing these error messages with their own content. The HTTP error code is listed, as well as the output type, which can be either the default HTTP 1.1 error, a file, or a URL.. If the default HTTP 1.1 error is used, the contents of the error message will appear under the Contents column of the table. If a file or URL is used, then the path to that file or URL will appear under the Contents column of the table.

By default, friendly custom error messages (see below) are listed in the Error Messages property sheet. To edit custom error messages, click the error number in the HTTP Error column. This will allow you to set the error message to the HTTP 1.1 default, map the error to a file, or map the error to a URL.

Note

If the output type is a URL, this URL must exist on a local server.

If you are using static custom error files (HTML files), you should always use the File option. If you plan on developing an application (via ISAPI or ASP) to handle errors, then use URL, but be aware that the error status is handed to the application in the URL parameters and it is the application's responsibility to set the HTTP header status, otherwise the HTTP response status will be HTTP 1.1 200 OK.

Friendly Custom Error Messages

IIS and PWS feature their own set of custom errors that provide more informative or "friendly" feedback than the default HTTP 1.1 errors that are returned to client browsers. For example, the HTTP 1.1 404 error message, which by default simply reads "Object Not Found" is expanded to read "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." These friendly custom error messages are set by default in Internet Service Manager.

To configure friendly error messages:

Select the default HTTP error that you would like to change, click the Edit Properties button, select URL from the Message Type box and type /iisHelp/common/<file name>

where <file name> is the HTML file name of the friendly error message. Friendly error messages are installed by default to the following location: <drive letter>:\WINNT\Help\common. The file names are numbers which correspond to the specific HTTP errors; for example, 400.htm, 401-1.htm, and so on.

Note

Custom errors appear as a list in the Error Messages property sheet and this list is treated as a single property. For example, when a set of custom errors are configured at the Web site level, all directories under that server inherit the entire list of custom errors. That is, the two custom error lists (for server and directory) are not merged. You can configure customized error messages at the Web site, virtual directory, directory, and file level.


© 1997 by Microsoft Corporation. All rights reserved.