title: Cookie expires or session timeout too soon
body: <p>I have code like this which is run when a user is authorized:</p>
  
  <pre><code> FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(
                   1,
                   email,
                   DateTime.Now,
                   DateTime.Now.AddMinutes(120),
                   true,
                   userData);
  
          string encTicket = FormsAuthentication.Encrypt(authTicket);
          HttpCookie faCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encTicket);
          faCookie.Expires = authTicket.Expiration;
          Response.Cookies.Add(faCookie);
  </code></pre>
  
  <p>I then redirect to a controller/Action that has the Authrize attribute:</p>
  
  <pre><code> [Authorize]
      public class ProductsController : Controller
      {
  </code></pre>
  
  <p>I have the following in web.config:</p>
  
  <pre><code> &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Home/Unauthorized" timeout="2880" /&gt;
      &lt;/authentication&gt;
      &lt;sessionState timeout="120"&gt;&lt;/sessionState&gt;
  </code></pre>
  
  <p>However users are complaining of session timing out or redirecting Home/Unauthorized after a couple of mins of inactivity.</p>
  
  <p>what could be causing this, what else should i check?</p>