Folks,
I am having real problems with my session variables, they keep timing out after 20 minutes. I want it to be 3 hours.
I only use one session variable called 'session.who' which I use to store the ID of the user logged into the system. At the start of each page I have an Include file which checks to see the variable exists and if it doesn't it forces them to login again.
I have listed my Application.cfm file below and in it you will see that I have set up code to destroy the session variables when the browser is closed. In the Application file you will see that the sessiontimeout value is set to 3 hours, in ColdFusion Administrator I went into the variables section and set both maximum and default timeout values for session variable to 3 hours and they are still timing out after 20 minutes.
Can anyone help?
Application.cfm
===========================================================
<!---
**
* Name:Macromedia
*
* Copyright (c) 2002 Macromedia. All Rights Reserved.
* DO NOT REDISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESSED
* WRITTEN PERMISSION OF MACROMEDIA.
--->
<cftry>
<cfapplication name="MyApp" sessionmanagement="Yes" setclientcookies="No" sessiontimeout=#CreateTimeSpan(0,3,0,0)#>
<!--- The next 2 lines when used with setclientcookies="No" make sure that session variables are destroyed when the browser is closed --->
<cfcookie name="CFID" value="#Session.CFID#">
<cfcookie name="CFTOKEN" value="#Session.CFTOKEN#">
<cfsetting showdebugoutput="yes">
<cfset factory = createObject("java", "coldfusion.server.ServiceFactory"
>
<cfset request.security = factory.securityService>
<cfset checkSecurity=request.security.RDSSecurityEnabled>
<cfcatch type="any">
<cfset checkSecurity="false">
</cfcatch>
</cftry>
<cfif checkSecurity>
<cfif IsDefined('form.rdspassword')>
<cfset rdspassword="#form.rdspassword#">
<cfelseif IsDefined('URL.rdspassword')>
<cfset rdspassword="#URL.rdspassword#">
<cfelse>
<cfabort>
</cfif>
<cfif NOT request.security.checkRDSPassword(rdspassword)>
<cfif NOT request.security.checkAdminPassword(rdspassword)>
<cfabort>
</cfif>
</cfif>
</cfif>
I am having real problems with my session variables, they keep timing out after 20 minutes. I want it to be 3 hours.
I only use one session variable called 'session.who' which I use to store the ID of the user logged into the system. At the start of each page I have an Include file which checks to see the variable exists and if it doesn't it forces them to login again.
I have listed my Application.cfm file below and in it you will see that I have set up code to destroy the session variables when the browser is closed. In the Application file you will see that the sessiontimeout value is set to 3 hours, in ColdFusion Administrator I went into the variables section and set both maximum and default timeout values for session variable to 3 hours and they are still timing out after 20 minutes.
Can anyone help?
Application.cfm
===========================================================
<!---
**
* Name:Macromedia
*
* Copyright (c) 2002 Macromedia. All Rights Reserved.
* DO NOT REDISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESSED
* WRITTEN PERMISSION OF MACROMEDIA.
--->
<cftry>
<cfapplication name="MyApp" sessionmanagement="Yes" setclientcookies="No" sessiontimeout=#CreateTimeSpan(0,3,0,0)#>
<!--- The next 2 lines when used with setclientcookies="No" make sure that session variables are destroyed when the browser is closed --->
<cfcookie name="CFID" value="#Session.CFID#">
<cfcookie name="CFTOKEN" value="#Session.CFTOKEN#">
<cfsetting showdebugoutput="yes">
<cfset factory = createObject("java", "coldfusion.server.ServiceFactory"
<cfset request.security = factory.securityService>
<cfset checkSecurity=request.security.RDSSecurityEnabled>
<cfcatch type="any">
<cfset checkSecurity="false">
</cfcatch>
</cftry>
<cfif checkSecurity>
<cfif IsDefined('form.rdspassword')>
<cfset rdspassword="#form.rdspassword#">
<cfelseif IsDefined('URL.rdspassword')>
<cfset rdspassword="#URL.rdspassword#">
<cfelse>
<cfabort>
</cfif>
<cfif NOT request.security.checkRDSPassword(rdspassword)>
<cfif NOT request.security.checkAdminPassword(rdspassword)>
<cfabort>
</cfif>
</cfif>
</cfif>