|
 |
asp_databases thread: session.timeout?
Message #1 by stephen.eighmey@s... on Tue, 19 Mar 2002 16:00:04
|
|
hello,
i have this script in the first few lines of an asp application i have
developed...
Session.Timeout=120
if Session ("userID")= False Then
Response.Redirect("login.asp")
end if
here is the actual login code...
Dim Conn, rsRecords
If Request.Form("userID") <> "" Then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "blah","blahblah","blahblahblah"
Set rsRecords = Conn.Execute("SELECT * FROM vsatwbt.ccLogin Where userID
= '" & Request.Form("userID") & "'")
If Not rsRecords.EOF Then
If Request.form("password") = rsRecords("password") Then
Session.Timeout=120
Session("userID") = Request.form("userID")
Session("password") = Request.form("password")
rsRecords.Close
Conn.Close
Response.Redirect "CallCenterMenu.asp"
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect password</font>"
End If
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect username</font>"
End If
rsRecords.Close
Conn.Close
End If
i want someone to be able to be in this application for 120 minutes after
they have logged in. i am finding that occasionally the application kicks
some people back to the login screen after about 20 minutes or so. have i
set this up incorrectly?
thank you.
Message #2 by agaisin@c... on Tue, 19 Mar 2002 12:09:57 +0000
|
|
sometimes works sometimes doesn't?
sounds strange??
Is it possible it never works?
Is it possible session.timeout isn't not getting set in all cases?
Anyhow, verify that folder your asp application is located within has been setup as an application from the iis snap-in and verify
other settings.
Try setting the session timeout globally from the IIS snap-in...
Good luck,
Arthur
---- Message from stephen.eighmey@s... at Tue, 19 Mar 2002 16:00:04 ------
hello,
i have this script in the first few lines of an asp application i have
developed...
Session.Timeout=120
if Session ("userID")= False Then
Response.Redirect("login.asp")
end if
here is the actual login code...
Dim Conn, rsRecords
If Request.Form("userID") <> "" Then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "blah","blahblah","blahblahblah"
Set rsRecords = Conn.Execute("SELECT * FROM vsatwbt.ccLogin Where userID
= '" & Request.Form("userID") & "'")
If Not rsRecords.EOF Then
If Request.form("password") = rsRecords("password") Then
Session.Timeout=120
Session("userID") = Request.form("userID")
Session("password") = Request.form("password")
rsRecords.Close
Conn.Close
Response.Redirect "CallCenterMenu.asp"
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect password</font>"
End If
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect username</font>"
End If
rsRecords.Close
Conn.Close
End If
i want someone to be able to be in this application for 120 minutes after
they have logged in. i am finding that occasionally the application kicks
some people back to the login screen after about 20 minutes or so. have i
set this up incorrectly?
thank you.
Message #3 by stephen.eighmey@s... on Tue, 19 Mar 2002 19:45:54
|
|
why won't this code override the default timeout value? what if i set it
at the very top of the page before the login script, does that make any
difference?
Message #4 by "Chaikin, Yaakov Y" <yaakov.y.chaikin@b...> on Tue, 19 Mar 2002 15:16:47 -0500
|
|
I am not sure if this is right, but it's an idea...
It looks like you are trying to set the TimeOut AFTER you already have some
session variables defined somewhere else and possibly even used. This means
that the server already set the timeout to default 20(30?). Is it possible
that once you used some variables, the time is ticking no matter what?
Possible solution: create a global.asa file and write Session_start function
where you can initialize your time out.
I hope it helped. In either case, please get back to me about it since I am
interested if it is actually the solution or not.
Thanks.
Yaakov Chaikin
Software Engineer
IT Department
BAE SYSTEMS
Voice: xxx-xxx-xxxx
Fax: xxx-xxx-xxxx
Yaakov.Y.Chaikin@b...
-----Original Message-----
From: stephen.eighmey@s... [mailto:stephen.eighmey@s...]
Sent: Tuesday, March 19, 2002 11:00 AM
To: ASP Databases
Subject: [asp_databases] session.timeout?
hello,
i have this script in the first few lines of an asp application i have
developed...
Session.Timeout=120
if Session ("userID")= False Then
Response.Redirect("login.asp")
end if
here is the actual login code...
Dim Conn, rsRecords
If Request.Form("userID") <> "" Then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "blah","blahblah","blahblahblah"
Set rsRecords = Conn.Execute("SELECT * FROM vsatwbt.ccLogin Where userID
= '" & Request.Form("userID") & "'")
If Not rsRecords.EOF Then
If Request.form("password") = rsRecords("password") Then
Session.Timeout=120
Session("userID") = Request.form("userID")
Session("password") = Request.form("password")
rsRecords.Close
Conn.Close
Response.Redirect "CallCenterMenu.asp"
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect password</font>"
End If
Else
response.write "<font face=Arial size=2 color=#000000>You have entered an
incorrect username</font>"
End If
rsRecords.Close
Conn.Close
End If
i want someone to be able to be in this application for 120 minutes after
they have logged in. i am finding that occasionally the application kicks
some people back to the login screen after about 20 minutes or so. have i
set this up incorrectly?
thank you.
|
|
 |