How to extend the session time automatically and how session cycle works in asp.net?
3 Answers
The Session State is extended when the user makes a request based on the unique string (provided that the session has not yet ceased). If the session time is expired, and a request is made based on the previous, then a new session will start and the form state (data that exists on form) will be submitted.
To extend the session state, go to your web.config file.
<?xml version="1.0">
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<sessionState timeout="90" cookieless="AutoDetect" />
</system.web>
</configuration>
The attribute
timeout="90"
sets a 90 minutes expiration time for the Session state. If there is no response within the time frame, the Session state is removed.
The attribute
cookieless="AutoDetect"
will store the unique string into the cookie, if the user does not have the cookie, it will utilize it within the url.

- 1,542
- 3
- 14
- 31
-
Session state timeout is in minutes, not seconds. – Dmytro Shevchenko Aug 20 '13 at 13:56
Please have a look at following
Session Timeout extend in Asp.Net
A must read if you are newb http://msdn.microsoft.com/en-us/library/ms972429.aspx

- 1
- 1

- 83
- 8
another way to alert the user that session has expired
http://code.msdn.microsoft.com/AspNetAlertSessionExpire-c230a148

- 2,133
- 7
- 45
- 82