Results 1 to 2 of 2

Thread: loss of session variable

  1. #1
    Join Date
    Dec 2004
    Posts
    152

    loss of session variable

    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.

    Code:
     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

  2. #2
    Join Date
    Sep 2005
    Posts
    20
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •