locked
Session Timed out before session expired. unable to set 120 minutes on production server RRS feed

  • Question

  • User2109697223 posted

    Hi All ,

    Session timed out early.  i have set the session timeout as 

    <sessionState timeout="120" mode="InProc" cookieless="false"/> and in IIS it is like  Idle Timeout=120. Still session expired after 30 minutes if i don't send any request to server.

    it's working fine on local machine but issue on production server.  Can anyone help?

    Thanks!

    Thursday, January 31, 2019 1:50 PM

All replies

  • User475983607 posted

    How have you verified Session times out?  Are there any error messages or unexpected behavior?

    Perhaps the login cookie is timing out and not Session? 

    Thursday, January 31, 2019 2:24 PM
  • User2109697223 posted

    Thank for reply,

    i am writting a log file in  Session_End(object sender, EventArgs e) and check when the session ended of particular user.

     and using Application_AcquireRequestState(object sender, EventArgs e) {} to check when last time requested by particular user.

    Using above both method i trace last request  and  session end time of  user.

    Thursday, January 31, 2019 2:34 PM
  • User475983607 posted

    Thank for reply,

    i am writting a log file in  Session_End(object sender, EventArgs e) and check when the session ended of particular user.

     and using Application_AcquireRequestState(object sender, EventArgs e) {} to check when last time requested by particular user.

    Using above both method i trace last request  and  session end time of  user.

    View the Session cookie properties in the browser's dev tools to verify the cookie expiration is the expected value.  Verify the client and server timezone settings are correct.

    Check if the web app pool or app is recycling every 30 minutes.  You can write an event view log. 

    Is the application throwing exceptions?  If so, what is the exception?  Is the application not behaving as expected?  If so, what is the expected behavior and actual behavior?

    Please try to be specific.

    Thursday, January 31, 2019 2:54 PM
  • User2109697223 posted

    Hi mgebhard,

    Thanks for your quick reply. I checked the  session cookie properties but there are is showing  expiration time as N/A.  client server timezone is same.

    Web pool is  1740 minute. i am little confuse which event log you are talking( since, i already writing session requested time and  session end time on session end event.) about please elaborate.

    As far as application is not throwing any exception. and application is behaving as expected.  There is only issue of session time out in 30 minute.  Session mode="inproc".

    I am tried hard to figure it out but still looking for the root cause.

    Thursday, January 31, 2019 3:27 PM
  • User475983607 posted

    I checked the  session cookie properties but there are is showing  expiration time as N/A.  client server timezone is same.

    Does not make sense.

    Web pool is  1740 minute. i am little confuse which event log you are talking( since, i already writing session requested time and  session end time on session end event.) about please elaborate.

    You can log app pool restarts in the event log.

    As far as application is not throwing any exception. and application is behaving as expected.  There is only issue of session time out in 30 minute.  Session mode="inproc".

    Session has been around a long long time.  Either the setting are not what you expect or there is something else causing these results.  I can only guess.  Perhaps your test has a bug.

    Thursday, January 31, 2019 4:25 PM
  • User2109697223 posted

    I checked app pool log restart in 130 because i set it  to 130. 

    I can't find what going wrong. 

    But ,I doubt on single sign on implementation , i have implemented  Azure Active Directory Single Sign-On recently then after issue appeared.

    Friday, February 1, 2019 8:01 AM
  • User475983607 posted

    But ,I doubt on single sign on implementation , i have implemented  Azure Active Directory Single Sign-On recently then after issue appeared.

    And we get more information...  InProc Session does not work across SSO applications.  Why Session is working at all is confusing given this new information.

    Azure Active Directory Single Sign-On uses tokens not Session.  Since there are no reported exception or unexpected results running the application I assume there is a misunderstanding or flaws in the test logic.

    Friday, February 1, 2019 1:31 PM
  • User2109697223 posted

    Yes, you got it right. i was assigning wrong application pool to my application and that pool idle time was set to 30 minute. Now i corrected the application with time 120 minute  and all set now. :)

    Friday, February 1, 2019 2:01 PM