Friday, October 19, 2012

Error message 401.2 After Installing a Web App on One Server But Not The Others


Symptom:

I have a standard ASP.NET application that works fine with any other IIS 7 server, but on a very specific server when I installed my application the I get 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.


I have done everything obvious like;
  • Check to make sure that application pool is run by a specific user, in my case Nework Service
  • Made sure that the above user has the full access. In fat, in desperation I have tried to make Everyone Full Control, and still I had above error.
Root Cause:

I did not write II7, so I do not know exactly why in one case it is like this way. Not quite undrestood at this time.

Workaround:

Yes, I was able to work this issue around, and this may as well be the right solution.
  • From the IIS 7 manager, go to the application to directory. You should see on the right panel the familiar ASP.NET and IIS sections with a bunch of icons.
  • Under the ASP.NET section, double click .NET Authorization Rules
  • Under the Actions panel all the way to the right click Add Allow Rule...
  • When the dialog appears select "All users"
Now try accessing the web page again.

Note, I am not responsible for any security related issues specific to your web application. This is a workaround for me, I do not care so much about security since in my situation the page is well deep behind firewalls and no public access.



No comments: