PDA

View Full Version : loss of session variable



numbenator
24 Aug 2005, 08:23 AM
Hi,
refering to http://www.collagenrx.co.uk/Student%20Space/home.asp

I set 2 session variables on the above login screen.

After you log in (username steve password admin) you can see to the left above the navigation that the session variable is shown. (steve)
My problem is that it resets after a very short period of time.
Each page I call beyon login checks the value of session variable and if not exist then redirects to the home page.



if Session("loggedIn") = "no" OR Session("loggedIn") = "" then
response.redirect "home.asp"
end if


If you messa round lookin gat stats etc and going through pages, all works fine and then suddenly, the session variable is reset and i am redirected to home.asp only after a minute or so if that.

Is there a logical reason why I am not able to hold the session variable.

Steve

sajjad27s
22 Sep 2005, 08:38 AM
Hi,

The default Session timeout is 20 minutes in IIS. Youcan set it with your value

Session.timeout = 60

I am not sure right now the value is in minutes or seconds or milliseconds. Check with MSDN.