Trying to get a site login set up and I keep getting the above error. I have enabled session vars in the CF admin, and have used sessionmanagement in my cfapplication. Not sure what I've done wrong.
<cfapplication name="myApp" sessionmanagement="yes" setclientcookies="yes" sessiontimeout="#CreateTimeSpan(0,1,0,0)#"><!--- Now define that this user is logged out by default ---><CFPARAM NAME="session.allowin" DEFAULT="false" /><CFPARAM NAME="session.userName" DEFAULT="" /><!--- Now if the variable "session.allowin" does not equal true, send user to the login page ---><!--- the other thing you must check for is if the page calling this application.cfm is the "login.cfm" page and the "Login_process.cfm" page since the Application.cfm is always called, if this is not checked the application will simply Loop over and over. To check that, you do the following call ---><cfif session.allowin neq "true"> <cfif ListLast(CGI.SCRIPT_NAME, "/") EQ "login.cfm"> <cfelseif ListLast(CGI.SCRIPT_NAME, "/") EQ "login_process.cfm"> <cfelse> <!--- this user is not logged in, alert user and redirect to the login.cfm page ---> <script> alert("You must login to access this area!"); self.location="login.cfm"; </script> </cfif></cfif>
Any help would be greatly appreciated.