Jump to content

Session Variable Problem


kwilliams
 Share

Recommended Posts

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.SessionIDSession("SessionID") = strSessionIDThen 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 Response.Redirect("logoff.aspx?timeout=true")End IfThe 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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...