title: ASP.Net MVC keep session alive for as long as possible
body: <p>We've an ASP.Net web app build with MVC 3. We've configured session timeout in web.config (we use forms base authentication) -</p>
  
  <pre><code>&lt;forms loginUrl="~/Common/Login" path="/" protection="All" timeout="180" requireSSL="false" slidingExpiration="true" defaultUrl="~/Common/Login" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /&gt;
  </code></pre>
  
  <p>Things have been working fine but after we went live the employees started using it like a typical windows app. "Login" once and keep the web app pages open until they worked, sometimes more then a ciuple of hours. The web app has typical postback pages as well as AJAX based sections and file uploads.</p>
  
  <p>Some recent debugging and review of user's activity log shows that this has caused some unexpected postback and serveir side processing.</p>
  
  <p>How long would you advise to keep the session alive? We also store imp data on server side session object. Can periodic page refresh be a solution?</p>