title: Windows Authentication not working on local IIS 7.5. Error 401.1
body: <p>I recently had a nasty issue getting Windows Authentication to work on a local instance of IIS 7.5 (Windows 7 Pro) to an ASP.net 4.0 site. I followed the basic steps.</p>
  
  <p>IIS Authentication</p>
  
  <ul>
  <li>Disable Anonymous Authentication</li>
  <li>Enable Windows Authentication</li>
  </ul>
  
  <p>Edit web.config</p>
  
  <pre><code>&lt;authentication mode="Windows" /&gt;
  </code></pre>
  
  <p>This did a nice job of enabling Windows Authentication but every attempt to login was rejected and ultimately returned a 401.1 error. This is where the problem started. There appear to be many reasons for this that are well documented around the web including here on Stack Overflow.</p>
  
  <p>I'd tried:</p>
  
  <ul>
  <li>Editing IIS Authentication 'Advanced settings' for Windows Authentication to disable Extended Protection and Kernel-mode authentication</li>
  <li>Editing IIS Authentication 'Providers' to move NTLM above Negotiate.</li>
  <li>Editing IIS .NET Authorization Rules to explicity Allow users (and various other combinations).</li>
  <li>Various IIS command line scripts and tweaks.</li>
  <li>Various config tweaks in web.config file. </li>
  <li>Even some file system permissions tweaks.</li>
  </ul>
  
  <p>But all to no avail, the dreaded 401.1 remained.</p>
  
  <p>This really is a case of "can't see the wood for the trees". None of the solutions I managed to find (call it a case of bad search parameters if you will) worked for me so I thought it worth posting this question to, hopefully, provide a clear answer that's easier to find for anyone suffering the same issue.</p>