title: Form Authentication with WebAPI expires after 5 minutes
body: <p>I have been creating a web project where I am using forms authentication using cookies to validate if the user is authentication.</p>
  
  <p>Everything works fine, but when I host this on shared hosting, then the session expired after 5 minutes of inactivity. I have set the timeout in the config to 60 minutes.</p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
              &lt;forms name=".auth" protection="All" timeout="60"/&gt;
          &lt;/authentication&gt;
  </code></pre>
  
  <p>While Login, I have created a API called login where I am setting the authentication.</p>
  
  <pre><code>FormsAuthentication.SetAuthCookie(".auth", false);
  </code></pre>
  
  <p>And I check if the user is authenticated in the web API and my API looks like.</p>
  
  <pre><code>    [Authorize]
      [RoutePrefix("api/value")]
      public class ValueController : ApiController
      {
          // GET api/value
          [Route("get")]
          public IEnumerable&lt;string&gt; Get()
          {
              return new string[] { "value1", "value2" };
          }
  
      }
  </code></pre>
  
  <p>I do know that this is a very old/bad approach to validate through cookie but this is my legacy application and I can't change the authentication structure and use Owin.</p>
  
  <p>Can anybody suggest why does it expires after 5 minutes of inactivity on shared hosting ? It does works properly on my local IIS and doesn't expires till 60 minutes.</p>
  
  <p>Help is appriciated. </p>