When you try to run a Web application that is hosted on a server that is running Internet Information Services (IIS) 7.0, you may receive an error message that resembles one of the following error messages:
Error message 1
Server Error in Application "Application Name" HTTP Error 401.1 - Unauthorized HRESULT: 0x8009030c Description of HResult: You do not have permission to view this directory or page using the credentials that you supplied.
Error message 2
Server Error in Application "Application Name" HTTP Error 401.1 - Unauthorized HRESULT: 0x8007052e Description of HResult: You do not have permission to view this directory or page using the credentials that you supplied.
This problem occurs because the <deny users> list in the Web.config file of the Web application is set to restrict certain users. This setting appears even though IIS 7.0 is configured to authenticate users who have valid Windows credentials. The <deny users> list is in the <authorization> section of the Web.config file.
Note The Web application uses the settings in the Web.config file to configure the Web application.
To resolve this problem, use one of the following methods.
In the <allow users> list of the Web.config file, add all users to whom you want to assign permissions. To do this, follow these steps:
On the server that is running IIS, click Start, type notepad in the Start Search box.
In the Programs list, right-click Notepad, and then click Run as administrator.
If you are prompted for an administrator password or for a confirmation, type your password or click Continue.
On the File menu, click Open. Locate the folder that contains the files for the Web application.
In the File name box, type web.config, and then click Open.
In the Web.config file, locate the following lines of code.