By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,586 Members | 1,043 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,586 IT Pros & Developers. It's quick & easy.

Quick one - Is SESSION per browser instance or per IP Address?

P: n/a
We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.
Apr 4 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.

Apr 4 '06 #2

P: n/a
Yes, I read that IE uses the same session ID, but what about session
variables that I create? For example,
Session["USERID"] = id;

Then if I open another browser and click on another user, a different ID
should be stored to the session variable. Will the 2 browsers confuse the
USERID session variable?

"Juan T. Llibre" wrote:
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
We have a question here where a developer says that if the same user starts 2
instances of the application on his machine, the session variables may get
mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
had its own session and the two instances of the application would never get
mixed up? Thanks.


Apr 4 '06 #3

P: n/a
re:
Will the 2 browsers confuse the USERID session variable?
No.

You will have individual session contents in each browser's session.

btw, the SessionID is recycled by IE only when Session.Abandon is called.
In normal operation, IE will get different sessions for each instance that is opened.

I just opened 3 browser instances with IE, and they all had different session ID's.

I wouldn't worry too much about that.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com... Yes, I read that IE uses the same session ID, but what about session
variables that I create? For example,
Session["USERID"] = id;

Then if I open another browser and click on another user, a different ID
should be stored to the session variable. Will the 2 browsers confuse the
USERID session variable?

"Juan T. Llibre" wrote:
That's easy enough to test, isn't it ?

All you have to do is place this :

<%=Session.SessionID%>

in an otherwise empty page...and call the page with different browser instances.

IE recycles the same SessionID for all browser inatances.
Firefox forces a new SessionID for each browser instance.

You might want to test other browsers.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
> We have a question here where a developer says that if the same user starts 2
> instances of the application on his machine, the session variables may get
> mixed up b/c the session is PER IP ADDRESS. I thought each browser instance
> had its own session and the two instances of the application would never get
> mixed up? Thanks.


Apr 4 '06 #4

P: n/a
Um, try it and see??

Apr 4 '06 #5

P: n/a
Um, I am new at this and wasn't entirely sure of the way to go about testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??

Apr 4 '06 #6

P: n/a
It is per browser instance. If using frames, it may be more than one per
browser instance.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Um, I am new at this and wasn't entirely sure of the way to go about
testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??

Apr 5 '06 #7

P: n/a
not necessarily
if you right click on a link and select "open in new window"- you will have
2 browser instances using the same session


"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uL**************@TK2MSFTNGP04.phx.gbl...
It is per browser instance. If using frames, it may be more than one per
browser instance.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"KMZ_state" <KM******@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Um, I am new at this and wasn't entirely sure of the way to go about
testing
it. Thanks for the help though.

"sirfunusa" wrote:
Um, try it and see??


Apr 10 '06 #8

P: 1
I think both Ctrl-N and shift-clic ("open in new window") will open a new frame in the same browser instances, not 2 browser instances. That's why the two frames will share the same session.


not necessarily
if you right click on a link and select "open in new window"- you will have
2 browser instances using the same session
Apr 27 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.