title: VS2013 ASP.NET MVC Single Page Application Template Auto Redirection
body: <p>The default SPA template in ASP.NET, in Visual Studio 2013 provides us with a default web site template. However, this template does not allow to see /Home/Index page and automatically redirects to /Account/Login. Now, I do want to use this nice feature, but not on my home page.</p>
  
  <p>I have tried the following:</p>
  
  <ol>
  <li>commenting out the Authorize attribute</li>
  <li>adding AllowAnonymous, OverrideAuthentication etc. one by one.</li>
  </ol>
  
  
  
  <pre><code>//[Authorize]
  [AllowAnonymous]
  [OverrideAuthentication]
  public class HomeController : Controller
  {
      [OverrideAuthentication]
      [AllowAnonymous]
      public ActionResult Index()
      {
          return View();
      }
  }
  </code></pre>
  
  <p>But it still redirects me to </p>
  
  <blockquote>
    <p><a href="http://example.com:49838/Account/Login?ReturnUrl=%2FAccount%2FAuthorize%3Fclient_id%3Dweb%26response_type%3Dtoken%26state%3D" rel="nofollow">http://example.com:49838/Account/Login?ReturnUrl=%2FAccount%2FAuthorize%3Fclient_id%3Dweb%26response_type%3Dtoken%26state%3D</a></p>
  </blockquote>
  
  <p>whenever I go to </p>
  
  <blockquote>
    <p><a href="http://example.com:49838/Home/Index" rel="nofollow">http://example.com:49838/Home/Index</a></p>
  </blockquote>
  
  <p>How can I prevent that?</p>