Asp session not getting stored...... Pls help !!!!!
we have a task tracker page (classic ASP) which is being used by associtates to track task durations. we need the page to be active throughout the day. associates use the page between intervals of 30 mins to few hours...
the server session timeout in IIS is 20 mins and i added the below meta tag in the page which refreshes the page in 15 mins:
[[[[<meta http-equiv="refresh" content="900">]]]]
also on every refresh i am checking the authentication checks and resetting the key session variables again to the previous values
e.g.
Session("NETWORK_ID")=Session("NETWORK_ID")
Session("NAME")=Session("NAME")
Session("DESIGNATION_ID")=Session("DESIGNATION_ID")
i have a default session timeout and authentication check on every page which redirects the user back to the login page.
something like this:
if Session("NETWORK_ID")="" or Session("NETWORK_ID")="0" or not Authenticated() then
Response.Redirect("clear.asp") 'this page abandons sessions and returns to login
end if
Inspite of these many associates are losing their session and are getting logged off to the login page. what do i do so that the users don't lose their sessions???
Cookies don't timeout, they expire on the date you set them to expire on. When a session expires, you can check to see if a cookie is set before loading the page. If the cookie is set you can restore all the session variables and the user would continue as if nothing changed.
one more question... if i am refreshing the page before the session timeout and every time resetting the session variables to their previous values, how come i am losing the session??
no.. i understand how the code has to be changed to include the cookies.
What i am asking is in the existing code why is the session getting timed out even though i am refreshing the page every 15 sec?
i thought refreshing the page would reset the session !!!
First, I created a login page and added that a key value pair to the session and verify that the session on that page that holds the pair. Next, I try to go to another page that looks for the pair in the session, and there is not. I've put out for the session to 15000 so it will not timeout.
Bookmarks