Hi,

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">

2
onRequestStart I do:
<cffile action="append" file="#ExpandPath("/")#lablog.txt" addnewline="true" 
output="#TimeFormat(Now(),"HH:mm:ss")#: This is the onRequestStart handler 
firing.">

onsessionStart I do:
<cffile action="append" file="#ExpandPath("/")#lablog.txt" addnewline="true" 
output="#TimeFormat(Now(),"HH:mm:ss")#: This is the onsessionStart handler 
firing [#session.sessionId#-#session.URLToken#]">

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)

My output is

1 23:04:30: This is the onsessionStart handler firing 
[f03024bf2eba70764b56755b7b2255662cc7-CFID=11288&CFTOKEN=78872746&jsessionid=f03024bf2eba70764b56755b7b2255662cc7]
2 23:04:30: This is the onRequestStart handler firing.
3 23:04:40: This is the onRequestStart handler firing.
4 23:04:54: This is the onRequestStart handler firing.
5 23:05:11: This is the onsessionStart handler firing 
[f03024bf2eba70764b56755b7b2255662cc7-CFID=11288&CFTOKEN=78872746&jsessionid=f03024bf2eba70764b56755b7b2255662cc7]
6 23:05:11: This is the onRequestStart handler firing.

(I put line numbers for clarity)

After the sessionTimeout elapsed on line 5 (request is more than 10 seconds 
after previous request) the onSessionStart handler gets called. That's 
expected. But:

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> 

Is the sessionmechanism in CF buggy?

Marc

I use CF 8,0,0,176276 on Win XP SP3 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:330843
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