Search code examples
asp.netsession-state

ASP.net Page session timeout not working


I am having a very strange issue, no matter what I do I could not stop the page from timing out. Here is the scenario We have a couple of pages with lots of data, the client selects some check boxes, select values from various drop downs etc. Some times the clients spend more than 30 minutes selecting/setting values. When they click on Submit the page timeouts and takes them to login page. When you login back in all the set values would be gone. Very frustrating. One would think selecting drop downs, entering data into text boxes etc. would be considered doing some activity on the page that should keep the session alive. But it doesn't seem to be the case. I have tried increasing the timeout value with out success.

Here is the code from web.config

    <authentication mode="Forms">
        <forms loginUrl="~/public/Login.aspx" slidingExpiration="true" timeout="200" protection="All" name="SampleApp"/>
    </authentication>
    <sessionState mode="InProc" cookieless="false" timeout="200"/>
    <httpRuntime maxRequestLength="204800" executionTimeout="3600" />

We also have machinekey tag setup with encryption keys.

Appreciate any help. Thanks in advance.


Solution

  • Increased the cookie timeout period in FormsAuthenticationTicket class and the problem is gone. Thank you all