title: Why is my ASP.NET MVC persistent auth cookie not working?
body: <p>I'm using ASP.NET MVC 3, with forms authentication (based on modified vanilla account code you get with file->new).</p>
  
  <p>When you login, I am setting an auth cookie with </p>
  
  <pre><code>FormsAuthentication.SetAuthCookie(userName, true);
  </code></pre>
  
  <p>So this should set a persistent cookie. But if I close the browser and re-open, when I browse to the site I am forced to log in again! I can see using chrome dev tools that the cookie (.ASPXAUTH) is being created and not being deleted when I close the browser, so what's happening?</p>
  
  <p>My web.config:</p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
    &lt;forms loginUrl="~/Account/LogIn" timeout="10000"/&gt;
  &lt;/authentication&gt;
  </code></pre>
  
  <p>I'm testing this locally, under IIS if that makes any difference.</p>