New Session Creation

N

Naina Mohamed

I have abandon a session in my page and navigate to some
other page thro' Redirect method, but i am getting old
session id in the navigated page.
How to get new session variable in navigated page
 
S

Saravana [MVP]

The Abandon method terminates a user session, destroys all the objects in
the current Session object, and releases its resources. But sessionid can be
recycled for same user, so it is very much possible to get the same
sessionid.
 
A

Alvin Bruney

But sessionid can be recycled for same user, so it is very much possible to
get the same
sessionid.

No. it's highly unlikely that this recycling would happen because session id
is 120 bits,
each character being assigned randomly by the random number generator.

You are partly correct but the reason for this oddity is entirely different.
After session abandonment or timeout the session id is maintained for as
long as the browser session is current. The implication is that the same
session id is being reused. This is by design for efficiency reasons so that
multiple sessions can
be serviced without need to regenerate a session id.

Why do you want a new session id? You can tell that this is not easy to do
without closing the browser
which i suspect is not an optimal solution for you. Maybe if you explained
what it is you were wanting to achieve then perhaps a better approach might
evolve.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top