title: Authentication session expires on ASP.NET MVC
body: <p>I want to log a user into an ASP.NET MVC site, and the session expires very quickly, in minutes.
  Authentication is done in one line of code:</p>
  
  <pre><code>authProvider.Authenticate(model.UserName, model.Password)
  </code></pre>
  
  <p>Then I have in Web.config: </p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
  &lt;forms loginUrl="~/Account/Login" name=".ASPXAUTH" timeout="300" slidingExpiration="true"&gt; 
  </code></pre>
  
  <p>and the setting on the IIS on the server for 300 minutes.</p>
  
  <p>What is the problem?</p>