| Author |
Topic Search Topic Options
|
pinakidas
Newbie
Joined: 05 February 2004
Status: Offline
Points: 4
|
Post Options
Thanks(0)
Quote Reply
Topic: TimeOut after a period of inactiveness Posted: 05 February 2004 at 9:25pm |
Can anyone suggest how to incorporate timeout after certain time for the forum . That is to say , if I am logged in to the forum and sitting inactive for certain time , I should be logged out . I am running on IIS and access database .
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 06 February 2004 at 3:55am |
|
If you disable the auto-login feature by editing the login_user.asp file cookies will be dropped after 20 minutes of inactivity.
|
|
|
 |
pinakidas
Newbie
Joined: 05 February 2004
Status: Offline
Points: 4
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 February 2004 at 1:48am |
Hi ,
Thanks for the answer . Can I control this timeout period . I need a shorter period (10 mins) .
Thanks .
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 February 2004 at 7:07pm |
In global.asa, in the Session_Start subroutine, put
Session.Timeout = 10
You could alternatively put it in every asp page.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
pinakidas
Newbie
Joined: 05 February 2004
Status: Offline
Points: 4
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2004 at 3:43am |
Thanks dp ,
Can I include this line ( Session.Timeout = 10 ) in common.asp ? In this way I'll be including this on every page . Please comment .
Edited by pinakidas
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 February 2004 at 7:29pm |
You can put it in common.asp but the Session_OnStart subroutine in global.asa is the better place if you want it to apply every where. The clock is reset every time you access an asp page, so you should only have to specify it once.
Edited by dpyers
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
manf
Newbie
Joined: 17 December 2004
Location: France
Status: Offline
Points: 4
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 December 2004 at 10:55am |
|
Hi.
I got the latest version of WebWiz (7.9) and I have a timeout problem :
I set the blnAutoLogin to False in login_user.asp, but there is still no timeout.
Moreover, it seems that the user's value for that preference is always
the default value which is set in blnAutoLogin. It is not saved in the
database.
I had a look at the register.asp file and if the form value is actually read :
line 374 : blnAutoLogin = CBool(Request.Form("Login"))
the variable blnAutoLogin is used for nothing but display (line 1778) and in the following code :
line 981 :
'Write a cookie with the User ID number so the user logged in throughout the forum
'But only if not in admin modem and using all parts of part 1 of the
reg form
If (blnAdminMode = False) AND (intUpdatePartNumber = 0 OR
intUpdatePartNumber = 1) Then
'Write the cookie with the name Forum containing the value UserID
number
Response.Cookies(strCookieName )("UID") = strUserCode
'If the user has selected to be remembered when they next login then
set the expiry date for the cookie for 1 year
If blnAutoLogin = True Then
'Set the expiry date for 1 year (365 days)
'If no expiry date is set the cookie is deleted from the users system
20 minutes after they leave the forum
Response.Cookies(strCookieName).Expires = Now() + 365
End If
End If
That will certainly set the cookie valid for one year ahead if
the boolean is equal to true, but in case it's False, it's not set to
any time limit eiter !
Or am I wrong ?
PS : what is the field in database where that preference is saved ?
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 December 2004 at 11:27am |
|
The value is not held in the database.
I think you are getting a little confused, so let me explain what is going on and how it works.
If a expiry time is not set, (as in the case of auto login is not checked) then the cookie is created as a session cookie.
Session cookies last the length of the session which is usually 20 minutes after inactivity or leaving the site.
Session cookies can be destroyed faster by closing your browser.
|
|
|
 |