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

Discussion in 'ASP .Net' started by =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006.

  1. 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.
     
    =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
     
    Juan T. Llibre, Apr 4, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    > news:...
    > > 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.

    >
    >
    >
     
    =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006
    #3
  4. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    >> news:...
    >> > 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.

    >>
    >>
    >>
     
    Juan T. Llibre, Apr 4, 2006
    #4
  5. =?Utf-8?B?S01aX3N0YXRl?=

    sirfunusa Guest

    Um, try it and see??
     
    sirfunusa, Apr 4, 2006
    #5
  6. 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??
    >
    >
     
    =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006
    #6
  7. 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" <> wrote in message
    news:...
    > 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??
    >>
    >>
     
    Kevin Spencer, Apr 5, 2006
    #7
  8. =?Utf-8?B?S01aX3N0YXRl?=

    gerry Guest

    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" <> wrote in message
    news:uLx1$...
    > 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" <> wrote in message
    > news:...
    > > 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??
    > >>
    > >>

    >
    >
     
    gerry, Apr 10, 2006
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Smythe
    Replies:
    3
    Views:
    1,288
    Jeff Smythe
    Jan 2, 2004
  2. Replies:
    5
    Views:
    2,590
  3. Replies:
    0
    Views:
    355
  4. chris brat
    Replies:
    1
    Views:
    651
    chris brat
    May 10, 2006
  5. Kent Johnson
    Replies:
    4
    Views:
    417
    Terry Hancock
    Nov 13, 2004
Loading...

Share This Page