Help with verifying login state

Results 1 to 3 of 3

Thread: Help with verifying login state

  1. #1
    Join Date
    Dec 1969

    Default Help with verifying login state

    When a user logs in, I set a session variable equal to their username. Before you flame me for using session variables, keep in mind this is the ONLY time in my asp that I use them.<BR><BR>When a user enters the asp, I check for the existance of the session variable using this code:<BR><BR>if Len(session("user")) &#062; 0 then<BR> &#039 Process Page<BR>else<BR> &#039 Write Login script<BR>end if<BR><BR>When a user has been inactive on the page for maybe 15 minutes and then tries to access it, the above validation fails and the user is asked to log in again.<BR><BR>How do session variables expire? Can they expire just by a user being inactive for a relatively short period (15-30 minutes)? Is there a way to make session variables last longer?<BR><BR>Or, should I try another way of maintaining login state?<BR><BR>HELP- your expertise is appreciated oh ASP Gods.

  2. #2
    seenu Guest

    Default RE: Help with verifying login state

    u can set up the session timeout in iis or u can <BR>set <BR><BR>Session.Timeout [ = nMinutes] in the page <BR><BR>nMinutes <BR>Specifies the number of minutes that a session can remain idle before the server terminates it automatically. The default is 20 minutes. <BR> <BR>it may help u

  3. #3
    sigma Guest

    Default RE: Help with verifying login state

    You can set the session.Timeout property to set when the session will timeout<BR>&#060;% Session.Timeout = 60%&#062; will set the timeout to an hour.

Posting Permissions

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