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
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
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???
thanx for the response.... but could you please explain more on that....
whats the difference between the two? are the cookies not supposed to get timed-out at all???
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.
ok... got it ....
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??
You would have to show your code. The only time you would read the cookie is if the session is lost.
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)