title: Windows Authentication not working in ASP.NET MVC 5 web app
body: <p>I have an ASP.NET MVC 5 app and am trying to enable Windows Authentication. The development machine is Windows Server 2008 R2, IIS Express 8.0, Visual Studio 2013 &amp; .NET Framework 4.5.</p>
  
  <p>I get a 404 Not Found error when ever I browse the app. The app enters a redirect loop with <strong>http://localhost:63455/Account/Login?ReturnUrl=%2F</strong>. Eventually the <code>ReturnUrl</code> ends up being very large as it gets appended to with each redirect.</p>
  
  <p>My web.config looks like this:</p>
  
  <pre><code>  &lt;system.web&gt;
      &lt;authentication mode="Windows"/&gt;
    &lt;/system.web&gt;
  </code></pre>
  
  <p>I've tried setting the <strong>Anonymous Authentication</strong> and <strong>Windows Authentication</strong> settings on the Development Server properties.</p>
  
  <p><img src="https://i.stack.imgur.com/CyxS4.png" alt="Development Server Properties"></p>
  
  <p>I've also tried adding the following <code>appSettings</code>:</p>
  
  <pre><code>&lt;add key="autoFormsAuthentication" value="false"/&gt;
  &lt;add key="enableSimpleMembership" value="false"/&gt;
  </code></pre>
  
  <p><strong>How can I get Windows Authentication working properly?</strong></p>