views:

302

answers:

2

I have a web site in ASP 3.0. This web site initialize authentication by session on the server, and retreive the id of the user in the session. A multiple clients access to the web site with no problem.

Some of them lost there session. I think is due to a client configuration with the sessionID token or someting like that.

Could some body tell me where are stored the sessionID on the client machine.

Thanks.

I read this post and just need to know what will be the name of the cookie ? Is it the same cookie that we can read/write in code ?

I try to find a way to identify, the sessionID storing on the client machine and the connected session on the server. Did a way to do that ?

+1  A: 

Session ID's can be stored in multiple ways on the client but it's the server configuration that specifies the exact way. If possible, cookies will be used. Otherwise, the session ID might be part of the URL or be part of the web page itself as a hidden form variable. Also, session ID's are often created to time out after a while. If a user isn't contacting the server within e.g. 20 minutes, the session expires and a new session would be required.

Workshop Alex
+1  A: 

The server allocates a session and stores its ID in a cookie, known as the session cookie. The ASP Session cookie has this format:-

ASPSESSIONIDACSSDCCC=APHELKLDMNKNIOJONJACDHFN

Note that last 8 characters in the name of the cookie will vary from one instance of your application to the next. Hence to even discover the cookie you need to enumerate all the cookies looking for any that match the pattern ASPSESSIONIDxxxxxxxx.

I'm not sure what you could usefully do with this cookie once you have acquired it.

AnthonyWJones
Thanks for your answer. The goal is not to do something with the cookie, but validate why my client create a new session on the web server after about 1 min.
Cédric Boivin
Are you storing alot of information in your cookies? Cookie storage is limited (to about 4K I think) after that its a firsts in first out system so its possible for you session cookie to pop off the list. Classic of this happening it with a big old tree view control that stores the state of the tree in a cookie, if its too big the browser bins other cookies to try to accommodate it. Nasty.
Pete Duncanson