4

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:

  • UPDATE: I have this same application successfully configured on a Rackspace Win2k8 production box and an in-house Win2k8 VM.
  • I am authenticating via the ASP.NET Membership Provider.
  • I am running EF5 against Oracle's Data Provider.
Community
  • 1
  • 1
bflow1
  • 969
  • 1
  • 10
  • 25
  • 1
    401.2 indicates "Logon Failed Due to Server Configuration with No Authentication". You've shown the authorization rules for your application, but what's the authentication configuration look like? Is the membership provider properly configured and executed? – Snixtor Aug 05 '13 at 21:10
  • Thanks for replying, Snixtor. As I alluded to in the post, I have Forms and Anonymous Auth enabled (not Windows Auth). I'll add a screen shot and part of the web.config. – bflow1 Aug 05 '13 at 22:58
  • is https involved? if so working properly? – phil soady Aug 05 '13 at 23:26
  • Thanks for replying, Phil. HTTPS is not to be involved on this one. However, I do have HTTPS enabled for the other two identical configs (see update above.) I did not set the bindings for this config, though. – bflow1 Aug 05 '13 at 23:28
  • About the Authorization rules, did you check the generated `Web.config`, especially in the ***Account*** folder ? – JoeBilly Aug 08 '13 at 09:00
  • Thanks for replying, JB. The Account folder web.config matches my IIS settings. This whole configuration works fine on my production server and multiple VMs I have set up for test. – bflow1 Aug 12 '13 at 20:53

2 Answers2

2

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.

bflow1
  • 969
  • 1
  • 10
  • 25
0

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.

farho
  • 33
  • 1
  • 7