What have you done to try and get it to fire?

This method will not get run until the sesion actually times out based on
the session timeout value set in either CF admin or in your code.

On Thu, Mar 26, 2009 at 3:14 PM, Tony Bentley <[email protected]> wrote:

>
> This is the first time I have tried to work with sessions and so far
> everything seems to be working fine except the OnSessionEnd function is not
> working. I have tried everything to get it to fire. It simply does not run
> at all.
>
>
>
> <cfcomponent output="false">
>
>        <cfset THIS.Name = "SessionOnlyCookiesTest" />
>    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 5, 0 ) />
>    <cfset THIS.SessionManagement = true />
>    <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 0, 10 ) />
>    <cfset THIS.SetClientCookies = false />
>
>    <cffunction name="onError"
>    returnType="void"
>    output="true">
>        <cfargument name="exception" required="true">
>        <cfargument name="eventname" type="string" required="true">
>        <cffile addnewline="yes" action="append"
> file="#expandpath('/test/test.txt')#"
>        output="Error: #exception# Event:#eventname# Current Time: #Now()#">
>    </cffunction>
>
>    <cffunction
>    name="OnSessionStart"
>    access="public"
>    returntype="void"
>    hint="Fires when user session initializes .">
>        <cfcookie name="CFID" value="#SESSION.CFID#" />
>        <cfcookie name="CFTOKEN" value="#SESSION.CFTOKEN#" />
>        <cfset SESSION.DateInitialized = Now() />
>        <cffile addnewline="yes" action="append"
> file="#expandpath('/test/test.txt')#"
>        output="A New Session: #SESSION.CFID# began on
> #SESSION.DateInitialized#">
>        <cfreturn />
>    </cffunction>
>
>    <cffunction
>    name="OnSessionEnd"
>    access="public"
>    returntype="void"
>    hint="Fires when user session ends"
>    >
>        <cfargument name="sessionScope" required="true"/>
>        <cffile addnewline="yes" action="append"
> file="#expandpath('/test/test.txt')#"
>        output="A Session Ended: #sessionScope.CFID# began on
> #sessionScope.DateInitialized# and ended #Now()#">
>    </cffunction>
>
> </cfcomponent>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321011
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to