How to refresh Session ID?

R

RC

Hi,

I wanna refresh the session ID after session terminated.
I called session.abandon() to end the session.

However, when I use same PC client to login the system.....the session id is
same as previous session, how to refresh the session ID in this case?

Regards,
RC
 
J

Juan T. Llibre

You can't do that unless the browser is closed.

If the browser isn't closed after the first session ends,
the Session ID will remain the same in the new session.
 
G

Guest

RC - From your question, I'm not sure exactly what you're doing but in the
current (nov 05) issue of the msdn, web q&a page 11, someone asks "if they
can force a new session id"? The editor suggest that this can be done by
editing the web.config file so that you have a cookieless session state:

=-=-=-=-=-
<sessionState ... cookieless="true" ... />
=-=-=-=-=-=-

In the cookieless mode, the server automatically inserts the sessionid into
the initial and all subsequent, relative url's. If you specify an absolute
URL for a redirect or popup a new browser session, a new sessionid will be
created (you'll see it as part of the url). YMMV - I personally am not a big
fan of having the sessionid in the url.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top