Well yes that would have been erroring, the reason being is that when a session expires there is no way to reference persistant variables like application, session and is why they are passed into the function in the first place.
I haven't used this, but one minute is too short for real world applications. So you might need to think about that, and maybe look into jsessionid, it expires straight away but requires more management. If I am correct I would say more in a REST sort of way. Making it statesless, something to thing about. But I am not 100% sure on those facts though. On 7/6/07, James Smith <[EMAIL PROTECTED]> wrote: > > Nope, I am setting the session timeout to > > this.sessiontimeout = createTimeSpan(0,0,1,0); > > so the session should end after 1 minute. I have changed the onSessionEnd > to > > <cffunction name="onSessionEnd" returnType="void"> > <cfargument name="SessionScope" required="yes"/> > <cfargument name="ApplicationScope" required="yes"/> > <cfscript> > arguments.applicationScope.Sessions = > arguments.applicationScope.Sessions - 1; > </cfscript> > </cffunction> > > As suggested by Kev and that seems to have sorted it. > > -----Original Message----- > From: Andrew Scott [mailto:[EMAIL PROTECTED] > Sent: 06 July 2007 09:48 > To: CF-Talk > Subject: Re: onSeessionEnd not working? > > If I understand your question, you can not expect the onSessionEnd to fire > when a user close their browser. It is only fired when the session > actually > times out by the settings set within you admin settings. > > On 7/6/07, James Smith <[EMAIL PROTECTED]> wrote: > > > > I currently have an Application.cfc with the following 3 functions... > > > > <cffunction name="onApplicationStart" returnType="void" output="no"> > > <cfscript> > > Application.Sessions = 0; > > </cfscript> > > </cffunction> > > > > <cffunction name="onSessionStart" returnType="void"> > > <cfscript> > > Application.Sessions = Application.Sessions + 1; > > </cfscript> > > </cffunction> > > > > <cffunction name="onSessionEnd" returnType="void"> > > <cfargument name="SessionScope" required="yes"/> > > <cfargument name="ApplicationScope" required="yes"/> > > <cfscript> > > Application.Sessions = Application.Sessions - 1; > > </cfscript> > > </cffunction> > > > > When the session starts the Application.Sessions variable is getting > > incremented correctly but for some reason it never goes down suggesting > > that > > onSessionEnd isn't getting called, am I missing some obvious setting > > somewhere? > > > > -- > > Jay > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283049 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

