> I can't see my sessionvariables change when the session is expired. This is 
> what I try:
>
> 1
> In /Application.cfc in the constructor area:
> <cfset THIS.sessionTimeOut = "#CreateTimeSpan(0, 0, 0, 10)#">
> <cfset THIS.sessionManagement = "true">
>
> ...
>
> onsessionEnd I do:
> <cffile action="append" file="#ExpandPath("/")#lablog.txt" addnewline="true" 
> output="This is the onsessionEnd handler firing
> [#arguments.sessionscope.sessionId#-#arguments.sessionscope.URLToken#]">
>
> (The sessionScope and ApplictionScope are arguments passed to the 
> onSessionEnd function)

Well, you're never going to see any output from onSessionEnd, because
if you do, that would indicate that the session hasn't actually ended.
The onSessionEnd and onApplicationEnd events don't generate any output
that can be seen by a user.

> Why are the values for cookies the same as before? I thought expired cookies 
> don't get sent by the browser anymore. But maybe
> I am mistaken and the CF server checks if cookies are expired?  Why is the 
> onSessionEnd handler not called? If I remove the ##
> stuff in onSessionEnd() so there's just text logged, it also does not appear 
> in my log, suggesting it does not fire.
> This is bad since I cannot rely on a sessionEnd e.g. handler to end a user 
> session via <cflogout>

I don't think that cookies expire when the session expires. If you're
using CFID and CFTOKEN cookies as the session token, those cookies
will last beyond the session, and beyond the closing of the browser.
If you're using JSESSIONID as the session token, that cookie will be
destroyed when the browser is closed.

If you're using CFLOGIN/CFLOGINUSER/CFLOGOUT, you'll also need to
associate login storage with the session in Application.cfc/cfm.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330846
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