New Browser Window = New SessionID?

J

Jerad Rose

I have searched high and low, and I can't find anybody having this problem,
so I'm sure it's something really simple I'm overlooking. In fact, I've
seen many posts of people trying to set up the exact problem I'm having.

My ASP.NET (2.0) SessionID is being reset every time I start a new browser.
I have tested this with a totally clean page, and totally clean Web.config
file, so that I know I'm using all of the default settings (mode = InProc,
cookieless = UseCookies).

I have a blank ASPX page, and all it does is write information to the trace
buffer:

Session.SessionID = w42g1ees1abjmujuqququf55
Session.Timeout = 20
Session.IsCookieless = False
Session.CookieMode = UseCookies
Session.IsNewSession = True
Session.IsSynchronized = False

If I start a new window, and key in the exact same URL, I get the exact same
information as above, except with a totally new SessionID.

Also, I tried to troubleshoot by looking at the actual cookie stored on my
machine, and I can't find it. Maybe this is an indication (since it's not
writing the cookie, then it has no choice but to reset every time a new
browser is created). However, I have no idea why this would be the case, as
I have never messed w/ the browser cookie settings on my machine, and all
other cookies on other sites work just fine. Also, it's not just my
computer -- the same thing happens on all computer that use this site.

I'm totally baffled, so any suggestions would be greatly appreciated.

Thanks in advance.
Jerad
 
B

bruce barker

asp.net uses a session cookie (do not write to storage). this means if
you start a new browser window you get a session. if you do new window,
or your javascript opens a new window, it will keep the same cookie.

if you want persistant cookie, you will need to override the session
cookie settings. You can do this with a custom session state manager.

-- bruce (sqlwork.com)
 
H

Hans Kesting

I have searched high and low, and I can't find anybody having this
problem, so I'm sure it's something really simple I'm overlooking. In
fact, I've seen many posts of people trying to set up the exact
problem I'm having.

My ASP.NET (2.0) SessionID is being reset every time I start a new
browser. I have tested this with a totally clean page, and totally
clean Web.config file, so that I know I'm using all of the default
settings (mode = InProc, cookieless = UseCookies).

I have a blank ASPX page, and all it does is write information to the
trace buffer:

Session.SessionID = w42g1ees1abjmujuqququf55
Session.Timeout = 20
Session.IsCookieless = False
Session.CookieMode = UseCookies
Session.IsNewSession = True
Session.IsSynchronized = False
If I start a new window, and key in the exact same URL, I get the
exact same information as above, except with a totally new SessionID.

A session on the server is not kept if there is nothing to keep in it. Try
writing
something to the Session in that testpage.
Also, I tried to troubleshoot by looking at the actual cookie stored
on my machine, and I can't find it. Maybe this is an indication
(since it's not writing the cookie, then it has no choice but to reset
every time a new browser is created). However, I have no idea why
this would be the case, as I have never messed w/ the browser cookie
settings on my machine, and all other cookies on other sites work just
fine. Also, it's not just my computer -- the same thing happens on
all computer that use this site.

I'm totally baffled, so any suggestions would be greatly appreciated.

Thanks in advance.
Jerad


The session-cookie is not stored on disk, it is kept in memory (so it will
disappear
when you close the browser).


Hans Kesting
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Jerad said:
I have searched high and low, and I can't find anybody having this problem,
so I'm sure it's something really simple I'm overlooking. In fact, I've
seen many posts of people trying to set up the exact problem I'm having.

My ASP.NET (2.0) SessionID is being reset every time I start a new browser.
I have tested this with a totally clean page, and totally clean Web.config
file, so that I know I'm using all of the default settings (mode = InProc,
cookieless = UseCookies).

I have a blank ASPX page, and all it does is write information to the trace
buffer:

Session.SessionID = w42g1ees1abjmujuqququf55
Session.Timeout = 20
Session.IsCookieless = False
Session.CookieMode = UseCookies
Session.IsNewSession = True
Session.IsSynchronized = False

If I start a new window, and key in the exact same URL, I get the exact same
information as above, except with a totally new SessionID.

Also, I tried to troubleshoot by looking at the actual cookie stored on my
machine, and I can't find it. Maybe this is an indication (since it's not
writing the cookie, then it has no choice but to reset every time a new
browser is created). However, I have no idea why this would be the case, as
I have never messed w/ the browser cookie settings on my machine, and all
other cookies on other sites work just fine. Also, it's not just my
computer -- the same thing happens on all computer that use this site.

I'm totally baffled, so any suggestions would be greatly appreciated.

Thanks in advance.
Jerad

There is a difference between starting a new window and starting a new
browser instance. If you use the "New Window" option in Internet
Explorer, it will create another window in the same session, but if you
start a new instance of Internet Explorer from the start menu (or
similar), it will become a separate process, and have it's own session.

Firefox on the other hand only ever has one instance of the program
running, so if you try to start another instance, it will only open
another window in the existing instance.
 

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

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top