Is the code below from the application.cfm? If so instead of using a cflocation why not just put the login logic as part of the application.cfm? If the session.userid does not exist the login logic is executed and if it exist the login logic is ignored.
-----Original Message----- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 3:43 PM To: CF-Talk Subject: CFLOCK and CFLOCATION Is it OK to do a <cflocation url="..."> from within a cflock? As in: <cflock type="readonly" scope="session" timeout="5" throwontimeout="no"> <cfif not IsDefined("session.userid")> <cflocation url="login.cfm"> </cfif> </cflock> Or does this leave the lock in place? If that's so, would the recommended workaround be to copy the session variable to a variables or request scope variable, something like this? <cflock type="exclusive" scope="session" timeout="5" throwontimeout="yes"> <cfparam name="session.userid" default="0"> <cfset request.userid = session.userid> </cflock> <cfparam name="request.userid" default="0"> <cfif request.userid eq 0> <cflocation url="login.cfm"> </cfif> Jim ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

