hughesmi
01-22-2010, 09:58 AM
I m using login function in my site with session. This session of mine gets expired after few minutes irrespective of that user has logged out or not. I know the default is 20 mins on IIS. I have tried this and it dosent work.
My code on each page is:
<%
Session.Timeout=30 ' Set sesction to 30 Mins.
IF Session("MySessionVerb") = False THEN ' declare that current user is validated
Response.Redirect "www.whatIwant.com"
ELSE ' If no session found then show normal
%>
Has anyone got a better way to keep the session vaild longer?
Just an after thought - I found this create a background JavaScript process in the browser that sends regular heartbeats to the server.
http://codingforums.com/showthread.php?t=70925
MIke
My code on each page is:
<%
Session.Timeout=30 ' Set sesction to 30 Mins.
IF Session("MySessionVerb") = False THEN ' declare that current user is validated
Response.Redirect "www.whatIwant.com"
ELSE ' If no session found then show normal
%>
Has anyone got a better way to keep the session vaild longer?
Just an after thought - I found this create a background JavaScript process in the browser that sends regular heartbeats to the server.
http://codingforums.com/showthread.php?t=70925
MIke