Hi
I have a client with several people accessing my application. I'm detecting and preventing multiple logins by setting an application variable using a user UUID. The problem is with session variables which as soon as they login in (<CFSET session.loggedin =True>) and the application variable is set, the machine loses the session variable immediately. The application.cfm detects that they are no longer logged in and kicks them out. They try and log in again but application.cfm detects that they are already logged in so that can't get in. This is happening everytime.
They are going through a (slow)proxy server. Is this affecting the sessions with multiple machines accessing the same application?. Any ideas PLEASE!!! I'm getting desparate. (
I took the login from a tutorial, can't remember which one though.
ps I'm very new to this so tips on variable scoping would help.
Many thanks
Here's my application.cfm page
<CFAPPLICATION NAME="MyApplication" SESSIONMANAGEMENT="Yes"
SETCLIENTCOOKIES="No" SESSIONTIMEOUT="#CreateTimeSpan(0,0,30,0)#"
APPLICATIONTIMEOUT="#CreateTimeSpan(0,0,30,0)#">
<CFPARAM NAME="session.LoggedIn" DEFAULT="FALSE">
<CFSET APPTIMESPAN = #CREATETIMESPAN(0,0,30,0)#>
<!-- If the user is not logged in yet -->
<CFIF #SESSION.LOGGEDIN# IS "FALSE">
<!-- ... and not currently on the login pages, or the forgotten password page -->
<CFIF (CGI.SCRIPT_NAME IS NOT "/lt/logontry.cfm" AND (CGI.SCRIPT_NAME IS NOT "/lt/logout.cfm">
<SCRIPT LANGUAGE="JavaScript">
alert("The system has detected an invalid login or your session on this machine has timed out. You will be prompted for your login/password again."
self.location='login.html';
</SCRIPT>
</CFIF>
<CFELSE>
<!-- this will reset the time stamp every time the user accesses a non-login related page, to keep track of his activity. -->
<CFIF (CGI.SCRIPT_NAME IS NOT "/lt/logontry.cfm" AND (CGI.SCRIPT_NAME IS NOT "/lt/logout.cfm">
<CFSET APPLICATION.USERSLOGGEDIN["#session.UuiD#"].TIMECREATED = NOW()>
</CFIF>
</CFIF>
I have a client with several people accessing my application. I'm detecting and preventing multiple logins by setting an application variable using a user UUID. The problem is with session variables which as soon as they login in (<CFSET session.loggedin =True>) and the application variable is set, the machine loses the session variable immediately. The application.cfm detects that they are no longer logged in and kicks them out. They try and log in again but application.cfm detects that they are already logged in so that can't get in. This is happening everytime.
They are going through a (slow)proxy server. Is this affecting the sessions with multiple machines accessing the same application?. Any ideas PLEASE!!! I'm getting desparate. (
I took the login from a tutorial, can't remember which one though.
ps I'm very new to this so tips on variable scoping would help.
Many thanks
Here's my application.cfm page
<CFAPPLICATION NAME="MyApplication" SESSIONMANAGEMENT="Yes"
SETCLIENTCOOKIES="No" SESSIONTIMEOUT="#CreateTimeSpan(0,0,30,0)#"
APPLICATIONTIMEOUT="#CreateTimeSpan(0,0,30,0)#">
<CFPARAM NAME="session.LoggedIn" DEFAULT="FALSE">
<CFSET APPTIMESPAN = #CREATETIMESPAN(0,0,30,0)#>
<!-- If the user is not logged in yet -->
<CFIF #SESSION.LOGGEDIN# IS "FALSE">
<!-- ... and not currently on the login pages, or the forgotten password page -->
<CFIF (CGI.SCRIPT_NAME IS NOT "/lt/logontry.cfm" AND (CGI.SCRIPT_NAME IS NOT "/lt/logout.cfm">
<SCRIPT LANGUAGE="JavaScript">
alert("The system has detected an invalid login or your session on this machine has timed out. You will be prompted for your login/password again."
self.location='login.html';
</SCRIPT>
</CFIF>
<CFELSE>
<!-- this will reset the time stamp every time the user accesses a non-login related page, to keep track of his activity. -->
<CFIF (CGI.SCRIPT_NAME IS NOT "/lt/logontry.cfm" AND (CGI.SCRIPT_NAME IS NOT "/lt/logout.cfm">
<CFSET APPLICATION.USERSLOGGEDIN["#session.UuiD#"].TIMECREATED = NOW()>
</CFIF>
</CFIF>