REPOST: ASP.NET Returns a New Session ID For Each Request

Discussion in 'ASP .Net' started by Edward Yang, Nov 18, 2003.

  1. Edward Yang

    Edward Yang Guest

    I find I have to repost one of my old posts again. I'm having the problem
    again here.

    <cite>

    This does not happen frequently, but does happen in rare unkown cases.

    For example, at the time I'm writing this post, I'm having this problem
    again.

    The test page I'm browsing simply displays the SessionID. Each time I
    refresh the page, the SessionID gets a new value!!!

    The result is that Session state is totally lost when in InProc mode! In
    StateServer mode, it simply says that the data cannot be serialized.

    Hope Microsoft will hear my voice.

    Thanks.

    </cite>

    More:

    I have both v1.0 and v1.1 framework installed. Since v1.1 was installed
    later than v1.0, all application mappings in IIS are mapped to v1.1 runtime.
    Edward Yang, Nov 18, 2003
    #1
    1. Advertising

  2. Edward Yang

    AW Guest

    1. check that the cookies are not disabled in your browser
    2. try to change the session mode to cookieless="true" in your web.config.

    For the error related with using StateServer, check that you aren't placin
    in the Session something that isn't serializable. For example, the objects
    that you create from you own written classes are not serializable by
    default, you need to place the [Serializable] attribute in front of them.
    --
    To reply, remove a "l" before the @ sign.

    Arnaud Weil - MCT, MCSD.Net, MCAD.Net
    AW, Nov 18, 2003
    #2
    1. Advertising

  3. Edward Yang

    Natty Gur Guest

    Hi,

    In addition to AW replay,

    Check with performance monitor -> ASP.NET object -> Application restart
    counter for the number of application restart. If the value is high your
    application is restarting and thus session ID changed. There are many
    causes for application recycling. The most common one is change that
    made to the Bin directory (your code is writing to) and changes to
    web.config that might be cause by anti-virus system.

    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Nov 19, 2003
    #3
    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. Edward Yang
    Replies:
    4
    Views:
    652
    Chris Cummings
    Jul 8, 2003
  2. Paul
    Replies:
    3
    Views:
    502
    Steven Cheng[MSFT]
    Jul 14, 2004
  3. Bruno Piovan

    One new session for each request...

    Bruno Piovan, Oct 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    281
    Martin Dechev
    Oct 16, 2004
  4. =?Utf-8?B?c2FtaWs=?=

    ASP.net session id changing on each request

    =?Utf-8?B?c2FtaWs=?=, Jul 20, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    7,755
    pcsunny
    Jul 11, 2007
  5. Rolf Welskes
    Replies:
    3
    Views:
    539
    Steven Cheng[MSFT]
    Oct 12, 2006
Loading...

Share This Page