Getting new session ID on each refresh!!!!

E

Edward Yang

I am getting a new session id on each refresh.

This is not the first time I have this problem. I have had this problem
with ASP.NET 1.0/1.1, and now with 2.0 beta 1.

The page is simple enough, which has:

void Page_Load(object sender, EventArgs e)
{
this.Title = Session.SessionID;
}

On each refresh (F5), it gives a different session ID! So everything
bascially not working in this way (especially session data).

I don't know the exact reason that is causing this.

Can Microsoft guys look into issue? Though this does not happen always,
but once it happens, it will be a nightmare!!!
 
H

Hermit Dave

this would normally happen if the client rejects the session cookie. ie if
the server cannot retrieve session info from the client it will create a new
instance for that client.

if you see it persistantly then make sure the client browser accepts cookies
from you site. otherwise consider using cookieless session info (adds
session info to the querystring).

--

Regards,

Hermit Dave (D'way)
http://hdave.blogspot.com
 
P

Patrice

What if you try to actually create a session variable ?

Could it be because ASP.NET doesn't bother to maintain the session without
at least one session variable defined ?

Patrice
 
E

Edward Yang

Hermit said:
this would normally happen if the client rejects the session cookie. ie if
the server cannot retrieve session info from the client it will create a new
instance for that client.

if you see it persistantly then make sure the client browser accepts cookies
from you site. otherwise consider using cookieless session info (adds
session info to the querystring).
Sorry, that's not the case.

It works 99.9999% of the time, but it did happen.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top