I am working on a subscription only site where tracking of which users are logged in is vital. I am using session variables to track user information that is used on each page and a database that records the last access time with each page request. Using JavaScript the user is automatically logged out after 20 minutes of no activity (mouse click or keypress on the page). When a user closes the browser without logging out the system checks the database time stamp and will consider them to be logged in for 20 minutes from the last access time.
In the website configuration in IIS I have "Enable session state" enabled and the "Session timeout" set to 20 minutes.
In the Global.asax Session_Start I have "Session.Timeout = 20"
My problem is that after working on the site for 20 minutes the session variables are being cleared, so the system thinks you are logged out.
Start Free Trial