Session Variable Problem
I'm trying to use session variables throughout a new dynamic site that I've created, but I'm running into problems with the session var's timing out even though there is activity by the user.
These are the basic steps that are involved with the sessions:
1) The user logs in with a username & password that must match a DB record (level1.aspx). This form's submittal redirects the user's browser to a background script page (bgscript.aspx).
2) If user is valid, SessionID is set for user on the background script page, like this:
Dim strSessionID As String = Session.SessionID
Session("SessionID") = strSessionID
Then the user is then redirected to the dynamic main page for the site (level2.aspx).
3) On level2.aspx, the Session.Timeout is set for 40 minutes. All pages are accessed dynamically from this page through SSI's. If the user's SessionID is empty, then they're redirected like this:
If Session("SessionID") = "" Then
The problem is that while the user browses the pages dynamically through the level2.aspx main page, the sessions all timeout after 20 minutes even though the user is active.
Could this be happening because I'm setting the SessionID on the bgscript.aspx page vs. the level2.aspx page? (Note: I'm doing that because the SessionID is inserted into a DB table on this same bgscript.aspx page) Shouldn't session variables pass between any pages on a site as long as the browser window is open? I'd really appreciate any help. Thanks.
It's the end of the world as we know it...and I feel fine