Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Xuan Mai #1
onSessionEnd Not Firing
I'm having a problem getting onSessionEnd to run when the session times out. I
copied the code off of the CF doc pages and it doesn't create the log file. the
cflog works if I put it in the onSessionStart, so I know that isn't the
problem. Any idea what it could be?
<cffunction name="onSessionEnd">
<cfargument name="SessionScope" required="yes">
<cfargument name="ApplicationScope" required="yes">
<cfset var sessionLength = TimeFormat(Now() - SessionScope.started,
"H:mm:ss")>
<cflock name="AppLock" timeout="5" type="Exclusive">
<cfset Arguments.ApplicationScope.sessions =
Arguments.ApplicationScope.sessions - 1>
</cflock>
<cflog file="#This.Name#" type="Information" text="Session
#Arguments.SessionScope.sessionid# ended. Length: #sessionLength# Active
sessions: #Arguments.ApplicationScope.sessions#">
<cfset tmp = StructClear(client)>
<cfset tmp2 = StructClear(session)>
<cfset client.tmp = "This is a temp value">
</cffunction>
Xuan Mai Guest
-
Preventing OnSessionEnd from firing for each instancein a cluster.
Hi, I have a clustered setup of three computers each with a cf server instance configured in a round-robin cluster with J2EE session variables... -
OnSessionEnd
I am programming an application, and I would like to file in a database the exact time at which a visitor arrived to a certain page and then shut... -
onSessionEnd()
I am currently programming an app and would like to make it so that if the user leaves the browser open and their session times out, it will kick... -
onSessionEnd problem
I have this UDF being called in the function onSessionEnd in my application.cfc file: <cffunction name="writeUserData" access="public"... -
Session_End Not Firing
Hey guys I have a user tracking setup to track users. What it does is once a user hits my site it sends me an email telling me some info and once a... -
BKBK #2
Re: onSessionEnd Not Firing
Perhaps your session hadn't timed out. Did you check that session
management is enabled and did you check the sessiontimeout
value?
In any case, I would use
<cfset tmp2 = StructClear(Arguments.SessionScope)>
instead of
<cfset tmp2 = StructClear(session)>
BKBK Guest



Reply With Quote

