Groups | Blog | Home
all groups > asp.net announcements > september 2004 >

asp.net announcements : Validate SessionID


Shankar Reddy
9/2/2004 10:05:48 AM
Hi,

Is it possible to validate whether the given SessionID is valied or not?
or in other words how do we identify whether the session is still active or
not? for a given session id?

Thanks
Shan

Henrik de Jong
9/6/2004 10:34:49 AM
Can you give an example of what you mean. I think that you mean
something other than I can read in your question.

AFAIK sessionid's are always valid as long as you can read them. An
sessionid is unique so a existing sessionid will never been used again
for any connection. Is this what you mean?

Henrik


Shankar Reddy schreef:
[quoted text, click to view]
Shankar Reddy
9/7/2004 10:11:41 AM
Let me make my question more clear...

lets say when we create a new record we issue a new RecordID, so at any
given point of time i can validate whether the record id is valid or not
by looking into my database.

Is there any similar concept for SessionID that was created by ASP.NET
when we create a new session?
or
ASP.NET creates a sessionID and leaaves on the air and don't keep track
of when it is created or is it alive or not, etc....

In order to create professional browser based applications these kind of
things are very useful.

I think this is very usefull if ASP.NET team consider this senarios like
this and if user closes the browser Session_END never fires and
stuff....






*** Sent via Developersdex http://www.developersdex.com ***
Henrik de Jong
9/22/2004 11:50:47 AM
Dear,

Excuse me for this late answer due to my holiday past week.

On the clientside the sessionid is stored in a cookie, or hidden field,
or in the url. On the serverside, I don't know exactly how asp.net
stores sessionid's, but I suspect that the App Domain is responsible for
that.
In your web.config you can find an option wich configures the sessionstate:

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />

When the session notices, after 20 minutes, that the session isn't still
in use it will fire een Session_End in your Global.asax.

I hope it will help you something...



Shankar Reddy schreef:
[quoted text, click to view]
AddThis Social Bookmark Button