In my asp.net webservice, i'm storing the sessionid("24-character string") of current session, By using this id, i have to check whether this session has expired or not in next subsequent calls. If it has been expired, then only have to create
another session, Else use the last one.
How could i achieve this . To check the session using sessionID, whether it is expired or not.
Homur
0 Points
2 Posts
Validate session using sessionID
Nov 20, 2012 12:34 PM|LINK
In my asp.net webservice, i'm storing the sessionid("24-character string") of current session, By using this id, i have to check whether this session has expired or not in next subsequent calls. If it has been expired, then only have to create another session, Else use the last one.
How could i achieve this . To check the session using sessionID, whether it is expired or not.
Needs soln.
Thanks
Homur.
Raigad
Contributor
5129 Points
956 Posts
Re: Validate session using sessionID
Nov 20, 2012 02:18 PM|LINK
You can get the session id like
string sessionId=Session.SessionID.ToString();
same for checking time Session.Timeout
here you can check whats the current status if you want to change the timeout you can update the new timeout here.
Or you can check for NUll if session is already expired.
Mark as Answer, if the post helped you...
Visit My Blog
Naved Hasan ...
Participant
1005 Points
212 Posts
Re: Validate session using sessionID
Nov 21, 2012 08:08 AM|LINK
You can check using: System.IsNullOrEmpty(SessionID.ToString())
Homur
0 Points
2 Posts
Re: Validate session using sessionID
Nov 26, 2012 12:03 PM|LINK
thank you guys for the quick reply..