Blog from Saravanan Arumugam

Let us talk about Technologies

Tag Archives: IIS Express

Error message 401.2.: Unauthorized: Logon failed due to server configuration.

I was trying to get my MVC 3 web application work through IIS 7.5 Express, and when I ran the application I got the following error.


Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server’s administrator for additional assistance.



As the first step I had to look at the web.config. The authentication mode was set to Windows Authentication.

    <authentication mode="Windows" />
      <deny users="?" />

Even though the web.config says that I need windows authentication, IIS Express need to be informed about it.

To resolve it, I did the following.

1. Clicked on the Web Project, and hit F4. (Right click and properties will get you to a different place)

2. Made sure that I can see the Properties Pane. (Not the property window).

3. Select Enabled for the Windows Authentication Property.


This would enable the windows authentication and get rid of the exception.


Use IIS Express option doesn’t appear on the context menu of a Web based Project

I wanted to use IIS express as the development server instead of Visual studio’s built in Development Server. For that I had to install Visual Studio 2010 SP1 and IIS 7.5 Express.

However in Visual Studio, I couldn’t fine the option “Use IIS Express” when I right click on the web project.



As an alternate to selecting Use IIS Express, right click on the project select Properties. In the property page select the Web Tab. Here, select Use Local IIS Web Server.

Make sure that Use IIS Express is checked.


This will ensure that the web application is starting in IIS Express.