Getting new session ID on each refresh!!!!

Discussion in 'ASP .Net' started by Edward Yang, Nov 26, 2004.

  1. Edward Yang

    Edward Yang Guest

    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!!!
    Edward Yang, Nov 26, 2004
    #1
    1. Advertising

  2. Edward Yang

    Hermit Dave Guest

    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

    "Edward Yang" <> wrote in message
    news:#...
    > 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!!!
    Hermit Dave, Nov 26, 2004
    #2
    1. Advertising

  3. Edward Yang

    Patrice Guest

    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


    --

    "Edward Yang" <> a écrit dans le message de
    news:%...
    > 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!!!
    Patrice, Nov 26, 2004
    #3
  4. Edward Yang

    Edward Yang Guest

    Hermit Dave wrote:
    > 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.
    Edward Yang, Nov 26, 2004
    #4
    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. Per Magnus L?vold
    Replies:
    1
    Views:
    5,109
    John C. Bollinger
    Oct 8, 2004
  2. Rolf Welskes
    Replies:
    3
    Views:
    538
    Steven Cheng[MSFT]
    Oct 12, 2006
  3. albertly
    Replies:
    3
    Views:
    14,029
    Steven Cheng[MSFT]
    Feb 8, 2008
  4. Pat Maddox
    Replies:
    6
    Views:
    150
    Marcin Mielżyński
    Jan 20, 2006
  5. TonyV
    Replies:
    19
    Views:
    761
    Mark Clements
    Mar 19, 2007
Loading...

Share This Page