title: ASP.Net random Session timeout
body: <p>Mine is a <strong>Windows authenticated</strong> asp.net solution (framework v4.0).  Implemented a 20 minutes session timeout, with Inproc mode and is mentioned in the web config file.  </p>
  
  <pre><code>&lt;authentication mode="Windows" /&gt;
  &lt;sessionState mode="InProc" timeout="20" /&gt;
  </code></pre>
  
  <p>The application is running as a <strong>separate app pool</strong> and the idle time-out value is set to 20 minutes.</p>
  
  <p>The application is hosted in <strong>IIS 7.5</strong>.</p>
  
  <p>But, the application timeouts randomly from 5 to 7 minutes, sometimes even within a minute.</p>
  
  <p>According to the Eventviewer only 20 minutes timeout events are logged.</p>
  
  <p>Any suggestion on what I'm missing ?</p>
  
  <p><strong>Note: My application runs in a separate pool.</strong></p>
  
  <p><strong>Update</strong></p>
  
  <p>Another thing that i noticed today in the server where application is hosted is, in the IIS coulnd't find the Session State icon.  Also when i checked the Services window found that the ASP.NET State Service's startup type is Disabled.  Should these two things be present in the server for an ASP.Net application to to track Session whose session mode is set to <strong>"InProc"</strong>.</p>
  
  <p><a href="https://i.stack.imgur.com/Vw28S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vw28S.png" alt="Missing Session State icon in IIS and ASP.Net State Service disabled"></a></p>