Last post Jan 13, 2011 01:36 AM by sirdneo
Jan 11, 2011 01:56 AM|g_dhinesh|LINK
session will out when no such intercation with site. if i'm refreshing my page automatically using timer, will it extend the session timeout?
Jan 11, 2011 03:39 AM|Lateef045|LINK
Are you talking about refreshing the page on the server side or are you refreshing the page at your client side?
If you are refreshing the page at client side, then Yes, Session will refresh on each post back to a page. So if you are refreshing the page with the timer, then the session wont expire.
Jan 11, 2011 03:55 AM|g_dhinesh|LINK
for example i'm calling a code behind function by OnTick event of Timer, no such user interaction. Will session get timeout?
Jan 11, 2011 04:02 AM|Lateef045|LINK
If you doing it on the server in some method, then the user Session will definitely expire.
Jan 11, 2011 04:05 AM|sovitmittal|LINK
Yes, Session has silding behaviour its means if you refresh the page then session timeout value will be reset, by default session timeout value is 20 mins.
There is no need of timer to refern the page, you just simple do this with the help of Meta tag.You can refresh the page with the help of Meta tag
<meta http-equiv="refresh" content="600">
Jan 11, 2011 04:07 AM|g_dhinesh|LINK
could you please explain it?
when some interaction will occur with server the sessionout period will get extend. here i'm interacting with server thru timer event. so why the session get expire?
actually how the session is working?
Jan 11, 2011 04:12 AM|Lateef045|LINK
Session gets refreshed on every post back that the user makes to the server.
So if you set the timer in your server code which will execute on its own, then in this way users are not at all involved.
But if you use meta tag fresh as shown by the above user, then the browser will refresh the page after the specified time interval. Since the browser refreshes the page, it is assumed as a new post back by the user to the server and hence the session will
Jan 11, 2011 06:38 AM|Miodrag Zivkovic|LINK
You can use max value for session timeout. That is 365 days.
<sessionState timeout="525600" /> <!-- This is a value in minutes! -->
Maximum Session Timeout
Jan 13, 2011 01:36 AM|sirdneo|LINK
yes it will extend the session expiration period. Also you can use aproach mentioned in this link to keep your session alive:-