Error message when you visit a Web site that is hosted on a computer that is running IIS 7.0: "HTTP Error 401.5 – Authorization failed by ISAPI/CGI application"

Symptoms

When you visit a Web site that is hosted on a computer that is running Internet Information Services (IIS) 7.0, you receive an error message that resembles the following message:
Server Error
--------------------------------------------------------------------------------
HTTP Error 401.5 – Authorization failed by ISAPI/CGI application
HRESULT: 0
Description of HRESULT # The operation completed successfully.

Cause

This problem occurs because an Access Denied error occurred. Therefore, one of the following objects could not finish the request:
  • A custom ISAPI extension
  • A CGI application
  • An ASP page
  • A handler
The URL that you tried to reach has an ISAPI, a CGI application, an ASP page, or a handler installed that verifies user credentials before the site lets you continue. This problem occurs because the application cannot verify your credentials.

Resolution

To resolve this problem, troubleshoot the specific object that is listed in the "Cause" section to determine why it does not authenticate the user.

To determine the object that generated the error, configure the Failed Request Tracing feature in IIS Manager to log information for the HTTP 401.5 error. Then, analyze the .xml file that is created. To do this, follow these steps.

Step 1: Turn on the Tracing feature

  1. Click Start, type control panel in the Start Search box, and then click Control Panel in the Programs list.
  2. Click Programs and Features, and then click Turn Windows features on or off.
  3. Expand Internet Information Services, expand World Wide Web Services, and then expand Health and Diagnostics.
  4. Click to select the Tracing check box, and then click OK.

Step 2: Enable the Tracing feature in IIS Manager

  1. Click Start, type Inetmgr in the Start Search box, and then click Inetmgr in the Programs list.

    Note If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
  2. In the Connections pane, expand the computer that is running IIS 7.0, expand Web Sites, and then click Default Web Site.
  3. In the Features view, double-click Failed Request Tracing.
  4. In the Action pane, click Add.
  5. Click All Content (*), and then click Next.
  6. In the Status code(s) box, type 401.5, and then click Next.
  7. Click Finish.
Properties

Article ID: 942078 - Last Review: Oct 8, 2007 - Revision: 1

Feedback