Session variable losing value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nate Spillson

    #1

    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
  • Rao TRN

    #2
    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@spi llson.com> wrote in message
    news:1ce32cdf.0 308060908.7944a 2b@posting.goog le.com...[color=blue]
    > 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[/color]


    Comment

    • Marina

      #3
      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@hotm ail.com> wrote in message
      news:%23cJ6n9DX DHA.2620@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > 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[/color]
      lost.[color=blue]
      > That is how a session is defined logically.
      >
      > "Nate Spillson" <nateusenet@spi llson.com> wrote in message
      > news:1ce32cdf.0 308060908.7944a 2b@posting.goog le.com...[color=green]
      > > 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[/color]
      >
      >[/color]


      Comment

      Working...