How to configure IIS7 when using mixed mode authentication with asp.net
<p>The following posts show how to setup the web.config for a site using Mixed Mode Authentication. <a href="http://stackoverflow.com/questions/2539038/iis7-mixed-mode-authentication">IIS7 Mixed Mode Authentication</a> and <a href="http://stackoverflow.com/questions/3970427/how-to-allow-mixed-mode-authentication-in-iis-7-0">How to allow mixed-mode authentication in IIS 7.0</a>.</p>

<p>I've got my site setup and working locally (on my developer machine).  However, when I run it locally on the server I get 401.2 - Login failed due to server configuration error.</p>

<p>Anyone know how I'm supposed to configure the server, Default Web Site, and My Site?</p>

<p>Edit: Here are the settings in my web.config, including the loginUrl from the Forms authentication node.</p>

<pre><code>    &lt;location path="~/Account/WinLogin.aspx"&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users="?"/&gt;
        &lt;allow users="*"/&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;security&gt;
        &lt;authentication&gt;
          &lt;anonymousAuthentication enabled="false"/&gt;
          &lt;windowsAuthentication enabled="true"/&gt;
        &lt;/authentication&gt;
      &lt;/security&gt;
    &lt;/system.webServer&gt;
  &lt;/location&gt;
  &lt;system.web&gt;
    &lt;authentication mode="Forms"&gt;
      &lt;forms loginUrl="~/Account/WinLogin.aspx" timeout="60"/&gt;
    &lt;/authentication&gt;
    &lt;authorization&gt;
      &lt;deny users="?"/&gt;
    &lt;/authorization&gt;
</code></pre>
