Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - TimeOut after a period of inactiveness
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TimeOut after a period of inactiveness

 Post Reply Post Reply Page  12>
Author
pinakidas View Drop Down
Newbie
Newbie


Joined: 05 February 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote pinakidas Quote  Post ReplyReply Direct Link To This Post 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 .

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pinakidas View Drop Down
Newbie
Newbie


Joined: 05 February 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote pinakidas Quote  Post ReplyReply Direct Link To This Post 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 .

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pinakidas View Drop Down
Newbie
Newbie


Joined: 05 February 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote pinakidas Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
manf View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2004
Location: France
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote manf Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.