Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Kiriran #1
Never ending session?!
well not really but i cant get the "onSessionEnd" event working
here the code i use
<cfcomponent>
<cfset This.name = "cfDev" />
<cfset This.sessionManagement = true />
<cfset This.sessiontimeout="#CreateTimeSpan(0,0,0,5)#" />
<cffunction name="onApplicationStart" returnType="void">
<cfset Application.startTime = Now()>
<cfif NOT IsDefined("Application.count")>
<cfset Application.count=0>
</cfif>
</cffunction>
<cffunction name="onSessionStart" returnType="void">
<cfset Session.startTime = Now()>
<cfset Application.count = Application.count +1>
</cffunction>
<cffunction name="onSessionEnd" returntype="void">
<cfset Application.count = Application.count -1>
</cffunction>
</cfcomponent>
so what is this code good for? i want to display the amount of users online.
so if a sessions starts Application.count add 1. if a session ends it substract
1. SessionStart works good, but sessionEnd wont do anything. i've set the
sessiontimout to 5. and you can see (if you output Session.startTime) that the
session always starts new after 5 secconds. so the onSessionEnd event should be
fired but isnt. what the problem?
thanks
chris
Kiriran Guest
-
Nested cftransactions ending my session
I'd like to write a general purpose component that lets me run functions that need to be wrapped inside a cftransaction, but which is clever enough... -
Ending Session - Stumped...
I've built a shopping cart... works well... however once the order has been confrimed I need to clear the session. I'm stumped! Can not find any... -
Ending session question
I'm curious, why is it when I sign out of a site I created using sessions I wind up with: default.cfm?CFID=1403&CFTOKEN=34792644 as well as... -
Ending Session
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works... -
ASPNET Session ending before time
> Hi, Where did you set the session timeout? The setting in the IIS console is overridden by the <sessionState timeout> value in machine.config...



Reply With Quote

