Sessions Expiring Prematurely on Production

Discussion in 'ASP .Net' started by Andrew Chung, Feb 12, 2007.

  1. Andrew Chung

    Andrew Chung Guest

    Hi all,

    For an application that I'm working on, upon successful
    authentication, Session.Timeout is set to 60 minutes. This behaviour
    works as expected on my own machine. If I refresh a page after 40
    minutes of inactivity, it remains, but after 61 minutes, it expires
    and I am sent back to the login page.

    However, once this code is put on the Production server, the sessions
    time out after only 20 minutes, even though the code sets it to 60.
    What could be causing this? The application is compiled before being
    put on Production, in case that matters.

    Thanks.
     
    Andrew Chung, Feb 12, 2007
    #1
    1. Advertisements

  2. Andrew Chung

    Teemu Keiski Guest

    In case sessions are set to use in-Proc mode, there can be various reasons
    why it expires. AppDomain restarts would cause sessions to expire, and
    AppDomain restart can happen when web.config is modified, bin folder
    modified, or multiple files / directories are created etc etc, it can even
    be a virus scanner touching some files.

    See following posts for further information:
    http://blogs.msdn.com/tess/archive/...variables-and-appdomain-recycles.aspx#1572598

    http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx
     
    Teemu Keiski, Feb 12, 2007
    #2
    1. Advertisements

  3. Andrew Chung

    Guest Guest

    In addition to what Teemu has said, are you sure that it's the Session timing
    out and not the fact that the Forms Authentication Ticket may have expired?
    Peter
     
    Guest, Feb 12, 2007
    #3
  4. Andrew Chung

    Andrew Chung Guest

    I'm not using Forms Authentication, the Authentication is done
    manually.
     
    Andrew Chung, Feb 12, 2007
    #4
  5. Andrew Chung

    Andrew Chung Guest

    The authentication is done manually, Form Authentication is not used.
     
    Andrew Chung, Feb 12, 2007
    #5
  6. Andrew Chung

    Andrew Chung Guest

    Oops, didn't know there was a delay in postings, thought I lost them.
     
    Andrew Chung, Feb 12, 2007
    #6
  7. Andrew Chung

    Guest Guest

    Guest, Feb 12, 2007
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.