Session variable losing value

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Session variable losing value

    I have an asp.net web application that uses session variables to store
    user information (username, security areas, configuration data). When
    the user logs into the system I store all of this information in a
    class and then dump it into a session variable. The timeout on the
    server is set to 2hrs. Every now and then (5min-30min) the web server
    will lose the session variable. This is very inconsistent and doesn't
    appear to have an associated pattern. Has anyone else come across this
    issue and determined the root cause?
    I've found a lot of posts that describe this issue but none that
    actually pinpoint the cause or solution.

    Please don't recommend that I use cookies, some other solution or
    question why I'm storing this information in a session variable. The
    application is structured in this way to meet specific user/regulatory
    requirements and user imposed constraints.

    Thanks!
    Nate
    Nate Spillson Guest

  2. Similar Questions and Discussions

    1. Losing session on xp ie6
      I'm having a problem with some users losing their session - it seems to be only xp ie6 machines affected. Even with cookies blocked it works fine...
    2. losing session
      I'm having a problem with some users losing their session - it seems to be only xp ie6 machines affected. Even with cookies blocked it works fine...
    3. losing a session?
      Hi Is it possible to lose a session? For instance if on www.coke.com $_SESSION = x; is set and on www.pepsi.com $_SESSION = notX; is set. ...
    4. Losing Session Variables?
      Do any of you guys have any idea what might be the reason for losing session variables, i was working on a page where i had to stroe a array in a...
    5. Losing Session variables
      - We have 2 aspx pages in a .NET project. The first sets a session variable and has a button that when clicked performs a 'redirect' to the second...
  3. #2

    Default Re: Session variable losing value

    Are you sure that the user keeps interacting with your web site for 2 hrs
    after he logs in? Typically, I guess you maintain one session class object
    per user and populates this class once the user logs in. Once the user
    terminates his session (by logging out and closing the browser), it is lost.
    That is how a session is defined logically.

    "Nate Spillson" <nateusenet@spillson.com> wrote in message
    news:1ce32cdf.0308060908.7944a2b@posting.google.co m...
    > I have an asp.net web application that uses session variables to store
    > user information (username, security areas, configuration data). When
    > the user logs into the system I store all of this information in a
    > class and then dump it into a session variable. The timeout on the
    > server is set to 2hrs. Every now and then (5min-30min) the web server
    > will lose the session variable. This is very inconsistent and doesn't
    > appear to have an associated pattern. Has anyone else come across this
    > issue and determined the root cause?
    > I've found a lot of posts that describe this issue but none that
    > actually pinpoint the cause or solution.
    >
    > Please don't recommend that I use cookies, some other solution or
    > question why I'm storing this information in a session variable. The
    > application is structured in this way to meet specific user/regulatory
    > requirements and user imposed constraints.
    >
    > Thanks!
    > Nate

    Rao TRN Guest

  4. #3

    Default Re: Session variable losing value

    It really depends on what you mean by "logging out and closing the browser".
    If there is code to call Session.Abandon() in the sign out code, then yes,
    this ends the session. But you don't know if there is.

    Simply closing the browser does not end the session. The session continues
    until the timeout.

    However, any new browser instances will create a new session - while the
    original one is still alive until the timeout occurrs.


    Things that can occur an applications restart:
    1) chaging DLL's, web.config, etc on the server
    2) certain antivirus scanners that scan the above files, thus triggering a
    restart

    "Rao TRN" <trn_study@hotmail.com> wrote in message
    news:%23cJ6n9DXDHA.2620@TK2MSFTNGP09.phx.gbl...
    > Are you sure that the user keeps interacting with your web site for 2 hrs
    > after he logs in? Typically, I guess you maintain one session class object
    > per user and populates this class once the user logs in. Once the user
    > terminates his session (by logging out and closing the browser), it is
    lost.
    > That is how a session is defined logically.
    >
    > "Nate Spillson" <nateusenet@spillson.com> wrote in message
    > news:1ce32cdf.0308060908.7944a2b@posting.google.co m...
    > > I have an asp.net web application that uses session variables to store
    > > user information (username, security areas, configuration data). When
    > > the user logs into the system I store all of this information in a
    > > class and then dump it into a session variable. The timeout on the
    > > server is set to 2hrs. Every now and then (5min-30min) the web server
    > > will lose the session variable. This is very inconsistent and doesn't
    > > appear to have an associated pattern. Has anyone else come across this
    > > issue and determined the root cause?
    > > I've found a lot of posts that describe this issue but none that
    > > actually pinpoint the cause or solution.
    > >
    > > Please don't recommend that I use cookies, some other solution or
    > > question why I'm storing this information in a session variable. The
    > > application is structured in this way to meet specific user/regulatory
    > > requirements and user imposed constraints.
    > >
    > > Thanks!
    > > Nate
    >
    >

    Marina Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139