Reputation: 515
I've got an old site that hadn't been updated in a while, and when I went to add some new code I decided to upgrade to the application.cfc. Clearly I'm not understanding how it should work, because once I switched it started ignoring the session variable set when the user logs in.
My application.cfm:
<cfcomponent>
<cfset request.root="">
<cfapplication
name = "SCR"
sessionmanagement = "Yes"
sessiontimeout = "#CreateTimeSpan(0,1,0,0)#"
applicationtimeout = "#CreateTimeSpan(0,12,0,0)#">
</cfcomponent>
My application.cfc
<cfcomponent>
<!--- Set up the application. --->
<cfset THIS.Name = "SCR" />
<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 12, 0, 0 ) />
<cfset THIS.SessionManagement = true />
<cfset THIS.SessionTimeout = CreateTimeSpan( 0, 3, 0, 0 ) />
<cfset THIS.SetClientCookies = true />
<cfset request.root="">
<cffunction name="onApplicationStart" returnType="boolean" output="false">
<cfreturn true>
</cffunction>
<cffunction name="onRequestStart">
<cfargument name="requesturi" required="true"/>
</cffunction>
</cfcomponent>
Upvotes: 1
Views: 312