Here is an example of what I did to deal with this, perhaps it will help.
(Please, everyone, let me know if this is not a good idea)

I have two application.cfm files.  One in a directory called 'login' and
another in my 'main' directory.

A  session.LoggedIn variable gets set by one of the files in the 'login'
directory. 

The application.cfm file in the 'main' directory checks for this session
variable and then throws the client back to the 'login' page (in the login
directory) if the session variable is not set.

Hope this helps?

/LEMAN/
[EMAIL PROTECTED]

-Details below-


Application.cfm file excerpts from both the 'login' and 'main' directories.


Login directory application.cfm has the following code:

=-=-=-=-=-=-=-=-=-=-
<!---Test for login --->
<CFIF session.LoggedIn EQ "false">
        <!--- clear session variables --->
        
        <!--- If the user is logged out, 
                  purge all array variables so they won't
                  have information left over from last
                  sesison.
        --->
        <cfoutput>

                <cfset temp = #ArrayClear(session.arClients)#>
                <cfset temp = #ArrayClear(session.arDrives)#>
                <cfset temp = #ArrayClear(session.arMapper)#>
                <cfset temp = #ArrayClear(session.arIBM)#>
                <cfset temp = #ArrayClear(session.arAS400)#>
                <cfset temp = #ArrayClear(session.arPPS)#>
                <cfset session.Comments = "NONE">
                <cfset session.MachineType = "NONE">
                <cfset session.LotusNotes = "NONE">
                <cfset session.Comments = "">

        </cfoutput>
        <!--- DO NOT throw them to the login page because this
application.cfm
                  Is used during the login process.
                <CFLOCATION URL="../login/Login.cfm"> 
        --->
</CFIF>
=-=-=-=-=-=-

application.cfm in the 'main' directory:

=-=-=-=-=-=

<!---Test for login --->
<CFIF session.LoggedIn EQ "false">
        <!--- clear session variables --->
        
        <!--- If the user is logged out, 
                  purge all array variables so they won't
                  have information left over from last
                  sesison.
        --->
        <cfoutput>

                <cfset temp = #ArrayClear(session.arClients)#>
                <cfset temp = #ArrayClear(session.arDrives)#>
                <cfset temp = #ArrayClear(session.arMapper)#>
                <cfset temp = #ArrayClear(session.arIBM)#>
                <cfset temp = #ArrayClear(session.arAS400)#>
                <cfset temp = #ArrayClear(session.arPPS)#>
                <cfset session.Comments = "NONE">
                <cfset session.MachineType = "NONE">
                <cfset session.LotusNotes = "NONE">
                <cfset session.Comments = "">

        </cfoutput>
        <!--- throw them to the login page since they are not logged in --->
        <CFLOCATION URL="../login/Login.cfm">
</CFIF>
=-=-=-=-=-


-----Original Message-----
From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 13, 2000 6:27 PM
To: '[EMAIL PROTECTED] '
Subject: Am I Missing Something?

Ok I am somewhat new to CF but something doesn't seem to be right.
I have a section of our site that is secure, for members only. I
have written the app to write a cookie so they don't have to login in the
future. That part works fine.

Now I just wanted to see what happened if someone had cookies turned off,
and of course even you can log in but the minute you try to go to a 2nd page
it loops back to the log in. 

Now before I implemented the cookies I did have session management on set to
about 30 minutes, which is still on, so people wouldnt have to relog in,
that worked fine. But with cookies off session management stops working too.
Does session management work only with cookies?

I tried something else, turned client management on, and used a database for
clientstorage, instead of the registry or cookies, just to test it out, but
that didn't keep them logged in either. I must be missing something but isnt
there a way to open and maintain a session without cookies? I changed
setclientcookies to "no" but as long as my browser cookies are off I still
can't get in.

Point is they get logged in and get to the first page after the login page
but if they try to go anywhere else they get kicked back to the login page,
which from the app.cfm below leads me to beleive its
not setting Session.Loggedin, and the only difference is that I turned my
browser cookies off.  Guess I just want to find out if Session.Loggedin HAS
to be set in a cookie or somewhere can i define it to be set a different
way. The client variables were however writing to the datasource with no
problem.

Any help would be appreciated.
Below is my Application.cfm
I have tried all 3 client storage methods.
and with setclientcookies on and off.

<cfapplication name="Members"
CLIENTSTORAGE="Clients"
clientmanagement="Yes"
sessionmanagement="Yes"
setclientcookies="NO"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#">
                          
<CFIF  NOT IsDefined("Session.LoggedIn")>
        <CFLOCATION URL="login/login.cfm">
<CFELSEIF Session.loggedin IS "0">
        <CFLOCATION URL="login/login.cfm">
</cfif>
       

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to