Skip to main content
Inspiring
April 10, 2007
Question

Application Timeout

  • April 10, 2007
  • 2 replies
  • 288 views
I have the admin site for the administrator users to login and do whatever they need to do.
I want the application is active for at least 2hrs and if it passed 2hrs then it automatic log out.
I have this code on my application.cfm but why i didn't work. I open the admin app and leave it there
for the whole date or even the date after but the application didn't log me out unless I close
all the broswer.

Here the code i have on application.cfm
<cfapplication name="Tech Transfer"
sessionmanagement="Yes"
setclientcookies="Yes"
sessiontimeout="#CreateTimeSpan(0,0,45,0)#"
applicationtimeout="#CreateTimeSpan(0,0,120,0)#">

Thanks

This topic has been closed for replies.

2 replies

Inspiring
April 11, 2007
Hi,

Set your sessiontimeout to 2 hours like this,

<cfapplication name="Tech Transfer"
sessionmanagement="Yes"
setclientcookies="Yes"
sessiontimeout="#CreateTimeSpan(0,2,0,0)#"
applicationtimeout="#CreateTimeSpan(0,0,120,0)#">

Put a file to check the session is defined or not like "sessionchecking.cfm" in where you need to put your code to check whether your session variable(s) exist or not.. If it doesnt exits then you can determine that the session has expired since the time has exceeded 2 hours since last action made so you can redirect your page to the login form...
Inspiring
April 10, 2007
Are you the only person with acces to any page that would activate that cfapplication file ? All CFM pages call the cfapplication file, so the application will never timeout unless nobody is using any CFM page on that site.

As soon as a page that uses that particular page is called, the cycle restarts, especially in the case of application timeouts.