Print Page | Close Window

TimeOut after a period of inactiveness

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9583
Printed Date: 11 April 2026 at 7:27pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: TimeOut after a period of inactiveness
Posted By: pinakidas
Subject: TimeOut after a period of inactiveness
Date 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 .




Replies:
Posted By: WebWiz-Bruce
Date 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.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: pinakidas
Date 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 .



Posted By: dpyers
Date 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.


Posted By: pinakidas
Date 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 . 



Posted By: dpyers
Date 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.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: manf
Date 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 ?


Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: manf
Date Posted: 20 December 2004 at 4:51am
Ok. I got it.

I thought the 'auto-connect' was a preference bound to the user's profile. It's actually a preference bound to the session. Right ?

Thanks for help.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net