I have found that if I clear the jsession cookie from my browser, the session works again. What if when the exception is caught, a "cookie-expiration" and "redirect" header is sent to the client?
<cfcatch type="any"> <cfheader ... (remove jsession cookie)/> <cfheader... (client redirect to current page)/> </cfcatch> On Sat, 12 Mar 2005 01:31:39 +0100, Nando <[EMAIL PROTECTED]> wrote: > I've been experimenting with application.cfc > > One of the things that i've seen on occasion in 6.1 is a "Session is > Invalid" error that users can get stuck in. I just saw a post over on > CF-Talk where someone recommended the following. The error seems to be > caused, at least according to the poster, by a discrepency or conflict > between J2EE sessions and CF sessions. It seems that if the CF session > expires and the underlying J2EE session still exists, CF throws a Session is > Invalid error at the cfapplication tag, which stops a new CF session from > being created. The net result is that the user is locked out of the > application (unless they move to another browser.) > > <cftry> > <cfapplication > name="myApp" > sessionmanagement="Yes" > sessiontimeout="#CreateTimeSpan(0,0,20,0)#" /> > <cfcatch type="Any"> > <cfapplication > name="myApp" > sessionmanagement="Yes" > sessiontimeout="#CreateTimeSpan(0,0,0,0)#" /> > </cfcatch> > </cftry> > > I'm experimenting with translating the above to application.cfc like so: > > <cfcomponent> > > <cftry> > <cfset this.name = "myApp" /> > <cfset this.sessionManagement = true /> > <cfset this.sessionTimeout="#createtimespan(0,0,20,0)#" /> > <cfcatch type="Any"> > <cfset this.name = "myApp" /> > <cfset this.sessionManagement = true /> > <cfset this.sessionTimeout="#createtimespan(0,0,0,0)#" /> > </cfcatch> > </cftry> > > Comments? Opinions? Some workaround seems to be necessary, because my first > CFMX 7 client (human) has run into this error numerous times in the last 3 > days as we get this app ready for launch, and he's understandably nervous. > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > -- Paul Kenney [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pjk.us ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
