About Internet Explorer "friendly" error message
According to the HTTP 1.1 specification, Internet Information Services (IIS) 5.0 returns a status code of 500 for any response that is not handled by another 1xx, 2xx, 3xx, 4xx, or 5xx status code, such as "302 - Object Moved", or "404 - File not Found". Because IIS 4.0 does not strictly follow RFC 2616, it returns Active Server Pages (ASP)-based Microsoft Visual Basic Scripting Edition (VBScript) errors with a status code of 200.
Several frequently-seen status codes have "friendly" error messages that Internet Explorer displays and that effectively mask the actual text message that the server sends. However, these "friendly" error messages are only displayed if the response that is sent to the client is less than or equal to a specified threshold. For example, to see the exact text of an HTTP 500 response, the content length must be greater than 512 bytes.
To display the actual message that the Web server sends, use one of the following methods.
Method 1: Turn off the friendly error message in Internet Explorer
- Turn off the friendly error message option in the browser as follows:
- In Internet Explorer, on the Tools menu, click Internet Options.
- On the Advanced tab, under the Browsing section, click to clear the Show friendly HTTP error messages check box, and then click OK.
- Close the browser.
- Use the Internet Explorer Administration Kit or System Policies to push the Show friendly HTTP error messages option down to clients. For more information about how to configure the "Custom ASP Errors" feature, visit the following Microsoft Web site:
Method 2: Enable and configure the "Custom ASP Errors" feature in IIS
- Use the "Custom ASP Errors" feature in IIS 5.0 to pad the response that the server sends with enough characters to override the friendly error messages. To download the "Custom ASP Errors" feature, visit the following Microsoft Web site:
- Implement this padding. To do this, use the VBScript String function to return a string of the same character, which is one more than the ErrorThreshold that Internet Explorer uses to display the friendly error message. For example, add the following line immediately before the </body> tag of 500-100.asp:
<% Response.Write String(513, "_") %>
- Configure the general 500 error to use Type=URL and 500-100.asp instead of Type=Default. By default, the 500 error is configured to use Type=Default. For additional information, click the article number below to view the article in the Microsoft Knowledge Base: 224070 Creating Custom ASP Error PagesNote IIS internally processes some HTTP 500 responses that are sent to the client as another HTTP status code. That internal status code is changed to 500 before the response to the client is sent. This is the case with the ASP Response.Status method. In these cases, the custom ASP error code is not checked in IIS. To work around these situations, use an Internet Server Application Programming Interface (ISAPI) filter that determines the status code that is sent to the client after IIS processes the page.
Method 3: Use an ISAPI filter Padresponse.exe to pad the response in IIS
The following file is available for download from the Microsoft Download Center:
Release Date: April 27, 2001
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
For additional information about all status codes that display friendly error messages and the registry location for the corresponding error threshold to override that friendly message, click the article number below to view the article in the Microsoft Knowledge Base: