Results 1 to 6 of 6

Thread: Losing Session Var's before timeout

  1. #1
    Senior Member MadBeaver's Avatar
    Join Date
    Jul 2003
    Location
    Bath, Maine
    Posts
    252

    Question Losing Session Var's before timeout

    I have been running into a problem with a web app that loses it's session.var's long before the session timeout value is up. It doesn't happen consistently, so it has been hard to track down the reason why.
    Code is ASP
    Server Win 2000

    Please let me know if there is any other info that would help.
    Mad Beaver

  2. #2
    AOs Resident Troll
    Join Date
    Nov 2003
    Posts
    3,152
    IIS timeouts...????????
    Start> All Programs>Administrative Tools > Internet Information Services (IIS) Manager

    Rightclick the virtual server you want to configure..then click Properties>Web Site tab.

    Connections.... in the Connection timeout box......Default is 120 second (2 mins)

    MLF
    How people treat you is their karma- how you react is yours-Wayne Dyer

  3. #3
    Senior Member MadBeaver's Avatar
    Join Date
    Jul 2003
    Location
    Bath, Maine
    Posts
    252
    Currently set to 900 sec (15 Min)
    Mad Beaver

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    Session timeout can also be set on a per-session basis in the application, and there are other reasons for sessions timing out.

    In ASP-classic (Which I assume is what you're referring to), sessions are held in memory in the space of the web application. In the event that the web application is reset, all sessions are wiped (This is determined by IIS seemingly arbitrarily, but may be affected by use of IIS manager or scripts modifying the metabase with ADSI).

    In ASP there is no provision for retaining session data across IIS application resets (e.g. machine reboot, IIS service restart, or IIS just resetting the application because it feels like it).

    If you're on shared hosting, you will find this unmanageable, as the hosting provider will doubtless use scripts which poke ADSI in ways which cause IIS resets at unpredictable regular intervals.

    Another possible cause of IIS resetting is that it's crashing. If that happens, evidence should be visible on the NT error log.

    Slarty

  5. #5
    Webius Designerous Indiginous
    Join Date
    Mar 2002
    Location
    South Florida
    Posts
    1,123
    What we do is to do the following before any code in the asp page:

    <%Session.Timeout=60%>


    This explicitly tells it to hold sessions for so long. Ihave never run into a problem with asp handling session vars or just "loosing" them.

    Try that and see what happens.

  6. #6
    Senior Member MadBeaver's Avatar
    Join Date
    Jul 2003
    Location
    Bath, Maine
    Posts
    252
    Thanks xmaddness. I updated all of my asp code, and so far so good.
    Mad Beaver

Posting Permissions

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