traigo
asked on
Session_OnStart problems in Global.asa
I am using some Ajax to check things like if the username already exists. If a session times out, instead of getting nothing or the correct return in my <span>, I get the login page. Also, if a user sits at the login screen for longer than the session timeout, when they go to login, it will just redirect them back to the login page. If they then login again, it will work. What do I do about these?
My Session_OnStart has:
If Application("START_PAGE") <> request.servervariables("S CRIPT_NAME ") or _
Request.ServerVariables("S CRIPT_NAME ") <> (Application("ROOT_DIR") & "loginverify.asp") then
RESPONSE.REDIRECT Application("START_PAGE")
End If
Thanks,
Traigo
My Session_OnStart has:
If Application("START_PAGE") <> request.servervariables("S
Request.ServerVariables("S
RESPONSE.REDIRECT Application("START_PAGE")
End If
Thanks,
Traigo
That is more of a business decision that technical one. Do you want the user to never expire the session? If so you could have an image getting refreshed in Javascript or have a hidden frame getting refreshed every 5 minutes or so to keep the session alive.
ASKER
I would like sessions to expire. In the page headers, I have meta http-equiv="refresh" to logout the users at a specified interval. The problem is both the register.asp (which uses the ajax) and the login page are not behind authentication. So anyone could open a session by going to one of those pages. If they just sit on the page I don't want to keep sessions alive indefinitely. I would like to release the memory. I guess I could use the meta http-equiv="refresh" to redirect the user back to the login page from register.asp at a specific time. I then still have the problem with the login.asp.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, I will probably just make a keepalive.asp that just returns blank and use some Ajax every so often to check that page.