Article ID: 942043 - Last Review: September 21, 2007 - Revision: 1.0
Error message when you try to visit a Web page that is hosted on IIS 7.0: "HTTP Error 401.2 - Unauthorized"
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 "<application name >" -------------------------------------------------------------------------------- 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 Click Start , type control panel in the Start Search box, and then click Control Panel in the Programs list. Click Programs and Features , and then click Turn Windows features on or off . Expand Internet Information Services , expand World Wide Web Services , and then expand Security . Click to select the Windows Authentication check box, and then click OK . Step 2: Add the Integrated Windows authentication native module in IIS Manager 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 . In the Connections pane, expand the computer that is running IIS 7.0, expand Web Sites , and then click Default Web Site . On the Default Web Site Home page, double-click Modules . In the Actions pane, click Add Native Module . 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:
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 . In the Connections pane, expand the computer that is running IIS 7.0, expand Web Sites , and then click Default Web Site . On the Default Web Site Home page, double-click Authentication . Click one of the authentication methods, and then click Enable in the Actions pane. APPLIES TO Microsoft Internet Information Services 7.0 kbexpertiseadvanced kbtshoot kbprb KB942043
Provide feedback on this information
Did this information solve your problem?
Was this information relevant?
What can we do to improve this information?
To protect your privacy, do not include contact information in your feedback.
Thank you! Your feedback is used to help us improve our support content. For more assistance options, please visit the
Help and Support Home Page .