IIS7 Error 401.2 with Forms / Anonymous Authentication Enabled

I installed the ASP.NET 4 Web Forms application on a remote Win2K8R2 virtual machine. I cannot deploy anything in this field remotely, so I sent the VS2012 Web Deployment Package , which I installed locally. I installed the Recommended IIS configuration using WebPI 4.6 .

I started using the default application pool (mine will be the only web application in IIS) in Integrated Pipeline mode with the LocalSystem identifier. This is the same configuration that I have successfully used for other web applications on the Win2K8 virtual machine and in the Win2K8 box.

I am using Forms / Anonymous Authentication. Account authorization is configured as follows:

enter image description here

My Authorization application is configured as follows:

enter image description here

UPDATE: My application authentication is configured as follows:

enter image description here

My membership provider is configured as follows:

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

My Forms Auth is configured as follows:

 <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 for SO, here is what I tried:

  • Re-register ASP.NET using IIS. ( aspnet_regiis -ir )
  • Using IUSR as an anonymous authentication user, full access to the web application directories for IUSR is granted.
  • The identifier of the connected application pool to NetworkService and the granted directory permissions of the applications for NETWORKSERVICE.
  • A user with dial-up anonymous authentication from IUSR to my server name ( xxxx/s_usr_acts , as shown in the previous screenshots) and gave s_usr_acts full rights to the web application directories.
  • aspnet_regiis at the application level .

I can get to the login page, but when I try to log in, I still get error 401.2. Anything else I can check or try?

Additional Information:

  • UPDATE: I have the same application successfully configured on the Rackspace Win2k8 production box and my own Win2k8 VM2.
  • I authenticate through an ASP.NET membership provider .
  • I am running EF5 against an Oracle data provider.
+4
source share
2 answers

UPDATE2: When I launched the web deployment package from the root of the C: drive on our client server, I came across 401.2. However, when I started it from the desktop, I no longer encountered 401.2 errors and "progressed" to errors connecting to Oracle. I have this as an answer, because my conclusions dealt with a specific problem, although I do not consider this canonicity at all. I still hope to get closer to the canonical answer.

+2
source

I had the same problem and solved it when I changed the credentials of anonymous authentication in the IIS authentication panel. When I selected Application Pool Id, the error disappeared. I do not know why this decision. Although I do not know what is the cause of this error, because I only wanted to update my web application by copying files from the deployment folder, except for the web.config file. Now, after lighting a fire, I will investigate why this is happening. At the moment, I think this may help someone.

0
source

Source: https://habr.com/ru/post/1495043/


All Articles