bflow1
bflow1

Reputation: 969

IIS7 -- 401.2 Error with Forms/Anonymous Auth Enabled

I have installed an ASP.NET 4 Web Forms app on a remote Win2K8R2 virtual machine. I cannot remotely deploy anything to this box, so I shipped a VS2012 Web Deployment Package which I installed locally. I installed the IIS Recommended Configuration through WebPI 4.6.

I started out using the Default Application Pool (mine will be the only web app on IIS) in Integrated Pipeline mode with LocalSystem identity. This is the exact same configuration that I successfully have used for other web apps on a Win2K8 VM and a Win2K8 physical box.

I am using Forms/Anonymous Authentication. The Account directory Authorization is configured this way:

enter image description here

My application Authorization is configured like this:

enter image description here

UPDATE: My application Authentication is configured like this:

enter image description here

My Membership Provider is configured like this:

<membership defaultProvider="ActsMembershipProvider">
                <providers>
                    <clear />
                    <add connectionStringName= [myString] 
                    name= [providerName] 
                    type= [assemblyName].[providerName] />
                </providers>
</membership>

My Forms Auth is configured like this:

<authentication mode="Forms">
        <forms name=".ASPXAUTH" loginUrl="~/Account/Login.aspx" defaultUrl="~/" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" />
</authentication>

UPDATED: After searching SO, here's what I have tried:

  1. Re-registering ASP.NET with IIS. (aspnet_regiis -ir)
  2. With IUSR as Anonymous Authentication user, granted full web app directory rights to IUSR.
  3. Switched App Pool identity to NetworkService and granted app directory rights to NETWORKSERVICE.
  4. Switched Anonymous Authentication user from IUSR to my server username (xxxx/s_usr_acts, as shown in previous screenshots) and gave s_usr_acts full rights to web app directories.
  5. aspnet_regiis at the app level.

I can reach my Login page, but I keep getting the 401.2 error when I try to log in. Anything else I can check or try?

Additional Info:

Upvotes: 4

Views: 3084

Answers (2)

farho
farho

Reputation: 33

I had the same problem and I solved it when changing Anonymous Authentication Credentials at IIS Authentication panel. When I selected "Aplication pool Identity" the error dissapeared. I don't know why this is the solution. Although I don't know what is the origin of this mistake neither, because I only wanted to update my web application copying the files from the deploy folder except the web.config file. Now, after putting out fire, i'll investigate why it happens. For the moment i think that can help somebody.

Upvotes: 0

bflow1
bflow1

Reputation: 969

UPDATE2: When I ran my Web Deployment Package from root of the C: drive on our client's server, I encountered the 401.2. However, when I ran it from the Desktop, I no longer encountered the 401.2, and "progressed" to Oracle connection errors. I have this as an answer because my findings addressed the specific problem, although I don't consider this canonical in any way. I am still hoping for something closer to a canonical answer.

Upvotes: 2

Related Questions