title: IIS7 -- 401.2 Error with Forms/Anonymous Auth Enabled
body: <p>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 <a href="http://msdn.microsoft.com/en-us/library/dd465323.aspx" rel="nofollow noreferrer">VS2012 Web Deployment Package</a> which I installed locally. I installed the IIS Recommended Configuration through <a href="http://www.microsoft.com/web/downloads/platform.aspx" rel="nofollow noreferrer">WebPI 4.6</a>.</p>
  
  <p>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.</p>
  
  <p>I am using Forms/Anonymous Authentication. The Account directory Authorization is configured this way:</p>
  
  <p><img src="https://i.stack.imgur.com/btmtr.png" alt="enter image description here"></p>
  
  <p>My application Authorization is configured like this:</p>
  
  <p><img src="https://i.stack.imgur.com/CvyoJ.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE:</strong>
  My application Authentication is configured like this:</p>
  
  <p><img src="https://i.stack.imgur.com/vYgsT.png" alt="enter image description here"></p>
  
  <p>My Membership Provider is configured like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;membership defaultProvider="ActsMembershipProvider"&gt;
                  &lt;providers&gt;
                      &lt;clear /&gt;
                      &lt;add connectionStringName= [myString] 
                      name= [providerName] 
                      type= [assemblyName].[providerName] /&gt;
                  &lt;/providers&gt;
  &lt;/membership&gt;
  </code></pre>
  
  <p>My Forms Auth is configured like this:
  </p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
          &lt;forms name=".ASPXAUTH" loginUrl="~/Account/Login.aspx" defaultUrl="~/" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /&gt;
  &lt;/authentication&gt;
  </code></pre>
  
  <p><strong>UPDATED:</strong> After searching SO, here's what I have tried:</p>
  
  <ol>
  <li>Re-registering ASP.NET with IIS. (<code>aspnet_regiis -ir</code>)</li>
  <li>With IUSR as Anonymous Authentication user, granted full web app directory rights to IUSR.</li>
  <li>Switched App Pool identity to NetworkService and granted app directory rights to NETWORKSERVICE. </li>
  <li>Switched Anonymous Authentication user from IUSR to my server username (<code>xxxx/s_usr_acts</code>, as shown in previous screenshots) and gave <code>s_usr_acts</code> full rights to web app directories.</li>
  <li><code>aspnet_regiis</code> <a href="https://stackoverflow.com/a/5910777/920506">at the app level</a>.</li>
  </ol>
  
  <p><strong>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?</strong></p>
  
  <p>Additional Info:</p>
  
  <ul>
  <li><strong>UPDATE:</strong> I have this same application successfully configured on a Rackspace Win2k8 production box and an in-house Win2k8 VM.</li>
  <li>I am authenticating via the <a href="http://msdn.microsoft.com/en-us/library/ms731049.aspx" rel="nofollow noreferrer">ASP.NET Membership Provider</a>. </li>
  <li>I am running EF5 against Oracle's Data Provider.</li>
  </ul>