Microsoft KB Archive/942043

= Error message when you try to visit a Web page that is hosted on IIS 7.0: &quot;HTTP Error 401.2 - Unauthorized&quot; =

Article ID: 942043

Article Last Modified on 9/21/2007

-

APPLIES TO


 * Microsoft Internet Information Services 7.0

-



SYMPTOMS
When you try to visit a Web page that is hosted on Internet Information Services (IIS) 7.0, you may receive the following error message:

Server Error in Application &quot;< >&quot;

HTTP Error 401.2 - Unauthorized

HRESULT: 0x80070005

Description of HRESULT: Access Is Denied



Cause 1
The Web application is configured to use Integrated Windows authentication. However, the Windows Authentication feature is not turned on. Or, the Integrated Windows authentication native module section of the ApplicationHost.config file or of the Web.config file is not valid. To resolve this problem, see Resolution 1.

Cause 2
The Web application is not configured to use an authentication method. To resolve this problem, see Resolution 2.



Resolution 1
To resolve this problem, follow these steps.

Step 1: Turn on the Windows Authentication 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 Security.
 * 4) Click to select the Windows Authentication check box, and then click OK.

Step 2: Add the Integrated Windows authentication native module in IIS Manager

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

If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
 * 1) In the Connections pane, expand the computer that is running IIS 7.0, expand Web Sites, and then click Default Web Site.
 * 2) On the Default Web Site Home page, double-click Modules.
 * 3) In the Actions pane, click Add Native Module.
 * 4) In the Add Native Module dialog box, click to select the WindowsAuthenticationModule check box, and then click OK.

Resolution 2
Configure the Web application to use at least one authentication method. To do this, follow these steps:
 * 1) Click Start, type Inetmgr in the Start Search box, and then click Inetmgr in the Programs list.

If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
 * 1) In the Connections pane, expand the computer that is running IIS 7.0, expand Web Sites, and then click Default Web Site.
 * 2) On the Default Web Site Home page, double-click Authentication.
 * 3) Click one of the authentication methods, and then click Enable in the Actions pane.

Keywords: kbexpertiseadvanced kbtshoot kbprb KB942043

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.