Session Variable dissappears between post backs on Win 2003

Discussion in 'ASP .Net' started by Dirc Khan-Evans, Oct 18, 2005.

  1. I have a problem with a Session variable that dissapears after a
    postback of one of my pages.

    This only happens on WIn 2003 servers.. it is fine on my XP dev box.

    This page opens in another window, but I have ascertained that is is
    definitely using the same session ID.

    Nowhere on the page do I clear the session variable.. it is only ever
    retrieved... this page only works if it is there.

    Has anyone had as similar problem? Any help gratefully received!

    Dirc
    --
     
    Dirc Khan-Evans, Oct 18, 2005
    #1
    1. Advertising

  2. Is the Windows 2003 server (you say servers which leads me to ask this) part
    of a webfarm? You may be losing sessions as you are moved from one server to
    another. If this is a the case one way to fix this would be to store session
    state on the SQL Server, if you're using one.

    Here's an article on how to move session state to the SQL Server. It's easy
    to do and has some other benefits such as users not losing their sessions
    even if a server in the farm needs to be restarted, etc.

    http://idunno.org/dotNet/sessionState.aspx

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "Dirc Khan-Evans" <> wrote in message
    news:uTgSjp$...
    >
    > I have a problem with a Session variable that dissapears after a
    > postback of one of my pages.
    >
    > This only happens on WIn 2003 servers.. it is fine on my XP dev box.
    >
    > This page opens in another window, but I have ascertained that is is
    > definitely using the same session ID.
    >
    > Nowhere on the page do I clear the session variable.. it is only ever
    > retrieved... this page only works if it is there.
    >
    > Has anyone had as similar problem? Any help gratefully received!
    >
    > Dirc
    > --
    >
     
    S. Justin Gengo, Oct 18, 2005
    #2
    1. Advertising

  3. No, no, no..

    I mean in multiple environments.. dev, testing and live.

    BTW, I have also tried using StateServer, since I have been told it is
    more reliable.. but something as simple as this should not happen on a
    lightly used test server!

    --
     
    Dirc Khan-Evans, Oct 18, 2005
    #3
  4. Dirc,

    Ok, I didn't realize you meant between multiple environments. So, you've
    already stated that this is not hapenning on your development box. Is it
    happening on the testing and production servers both? Are other developers
    deploying code to the testing or production servers at the same time?

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "Dirc Khan-Evans" <> wrote in message
    news:%23SNpu5$...
    > No, no, no..
    >
    > I mean in multiple environments.. dev, testing and live.
    >
    > BTW, I have also tried using StateServer, since I have been told it is
    > more reliable.. but something as simple as this should not happen on a
    > lightly used test server!
    >
    > --
    >
     
    S. Justin Gengo, Oct 18, 2005
    #4
  5. S. Justin Gengo wrote:

    > Dirc,
    >
    > Ok, I didn't realize you meant between multiple environments. So,
    > you've already stated that this is not hapenning on your development
    > box. Is it happening on the testing and production servers both? Are
    > other developers deploying code to the testing or production servers
    > at the same time?


    No.. I am the only one changing anything in the bin folder... I know
    where you are coming from.. There are no changes going on that would
    cause an IIS restart.

    To reiterate: The interesting things to note is that
    (a) it always happens with this page.. it is in no way an intermittent
    problem,
    (b) this only happens when the new page is displayed in another window.
    The first page loads fine but after that the session variable totally
    dissappears for no apparent reason.. there is no explicit removal of
    any Session variables in the code.
    (c) It only happens on IIS6/ win 20003 servers. Not XP
    (d) The session has the same sessionID for both windows (as expected).

    This really smells of a bug to me.....

    Dirc

    --
     
    Dirc Khan-Evans, Oct 19, 2005
    #5
  6. Dirc,

    Ok, here's a test to try. In the first window create a button that, when
    clicked, response.writes the session variable to the page.

    Open the page and click the button to confirm the session variable is there.
    Then open your second page. Click the first page's session variable button
    again to see if the session variable has disappeared. I'm wondering if the
    pop-up window is somehow using a different session.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "Dirc Khan-Evans" <dirc.khan-evans@[no_spam_please]eurorscgskybridge.com>
    wrote in message news:...
    > S. Justin Gengo wrote:
    >
    >> Dirc,
    >>
    >> Ok, I didn't realize you meant between multiple environments. So,
    >> you've already stated that this is not hapenning on your development
    >> box. Is it happening on the testing and production servers both? Are
    >> other developers deploying code to the testing or production servers
    >> at the same time?

    >
    > No.. I am the only one changing anything in the bin folder... I know
    > where you are coming from.. There are no changes going on that would
    > cause an IIS restart.
    >
    > To reiterate: The interesting things to note is that
    > (a) it always happens with this page.. it is in no way an intermittent
    > problem,
    > (b) this only happens when the new page is displayed in another window.
    > The first page loads fine but after that the session variable totally
    > dissappears for no apparent reason.. there is no explicit removal of
    > any Session variables in the code.
    > (c) It only happens on IIS6/ win 20003 servers. Not XP
    > (d) The session has the same sessionID for both windows (as expected).
    >
    > This really smells of a bug to me.....
    >
    > Dirc
    >
    > --
    >
     
    S. Justin Gengo, Oct 19, 2005
    #6
  7. Dirc Khan-Evans

    Rosanne Guest

    Do you have anti-virus software running? You stated that you are th
    only one changing the bin folder...but if you have anti-virus softwar
    running it could be touching the bin folder. We had the same proble
    with session and disabling the anti-virus s/w fixed the problem

    --
    Rosann
    -----------------------------------------------------------------------
    Rosanne's Profile: http://www.highdots.com/forums/m28
    View this thread: http://www.highdots.com/forums/t303550
     
    Rosanne, Oct 20, 2005
    #7
    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. =?Utf-8?B?bmljbw==?=

    session cookie dissappears

    =?Utf-8?B?bmljbw==?=, Oct 3, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    398
    =?Utf-8?B?bmljbw==?=
    Oct 3, 2005
  2. Thiyagu
    Replies:
    0
    Views:
    412
    Thiyagu
    Nov 16, 2005
  3. Andy Sutorius
    Replies:
    0
    Views:
    646
    Andy Sutorius
    Nov 22, 2005
  4. Tuhin
    Replies:
    0
    Views:
    508
    Tuhin
    Aug 25, 2007
  5. Krist
    Replies:
    6
    Views:
    751
    Arne Vajhøj
    May 7, 2010
Loading...

Share This Page