Search code examples
asp.net-mvcauthorizationiis-7.5http-status-code-401

IIS 7.5 MVC 2 problem with 401.3 error


I have a mixed WebForms/MVC application I'm trying to deploy to our staging environment, which is a fresh install of Server 2008 R2, with IIS 7.5.

This application works fine while developing on anyone's local machine (via visual studio's web server), however when when it's hosted on the staging server we get the following error:

HTTP Error 401.3 - Unauthorized

You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

Things I've set to try to fix this:

  • Anonymous Authentication is Enabled.
  • All other forms of authenication are disabled.
  • Authorization is set to allow all users.
  • the IIS_IUSRS group has access via the file system.

Solution

  • This is (sort of) a duplicate of this question which fixed the issue for me.

    From that post:

    IIS 7 also creates "IUSR" as default user to access files via IIS. So make user IUSR has read access to files/folders.

    How to check if IUSR has read Access? Right Click -> Folder -> Properties -> Security Tab See if IUSR is in Group or user names list, If No.

    Click Edit -> Add -> Advanced -> Find Now -> Select IUSR and click OK four times