title: Unable to get windows authentication to work through local IIS
body: <p>So I've created a new ASP.NET MVC project using the intranet template. web.config contains the appropriate values (e.g. <code>&lt;authentication mode="windows"/&gt;</code>).</p>
  
  <p>If I fire up the web app using the VS webserver, it all looks fine - the page shows my Windows domain and username and all. However, this works in Opera and Safari as well as IE and FF, which says to me it's not using Windows auth at all (since to the best of my knowledge this doesn't work in any browser except IE/FF).</p>
  
  <p>Next step is to get it working through local IIS. I create a hosts file entry pointing www.mysite.mydomain to 127.0.0.1. So in IIS I create website with a binding to www.mysite.mydomain and enable Windows authentication and disable anonymous authentication.</p>
  
  <p>I have set up IE and FF to enable Windows auth as follows:</p>
  
  <p><strong>IE</strong></p>
  
  <ol>
  <li>Add URL to intranet group</li>
  <li>Ensure Windows auth is enabled in the advanced settings</li>
  </ol>
  
  <p><strong>FF</strong></p>
  
  <p>Put 'www.mysite.mydomain' into network.automatic-ntlm-auth.trusted-uris config setting.</p>
  
  <p>But when I dial up www.mysite.mydomain in IE / FF I get a login prompt. Interestingly, even when I type in my Windows login here, it still fails and shows me the login prompt again.</p>
  
  <p>We don't have active directory here but my understanding is that it should work fine with a local account.</p>
  
  <p>I can't think of anything else I need to do. Any suggestions?</p>
  
  <p>Edit: we've recently switched to using Active Directory and the problem remains.</p>
  
  <p>Edit: when I cancel the login prompt, I get taken to an 'IIS 7.5 Detailed Error' page with the following information:</p>
  
  <blockquote>
    <p>HTTP Error 401.2 - Unauthorized
    You are not authorized to view this page due to invalid authentication headers.**</p>
  </blockquote>