I can assure you that the issue you're facing is not the fault of
ColdFusion. In looking at your code snippets it seems that you are new to
ColdFusion and perhaps lack an understanding of how things work within the
context of a ColdFusion server and page request.

First off, setting session timeout to 90 days and 12 hours is, well, silly.
I can virtually guarantee you that the server itself is set with a
drastically smaller session timeout (probably in the range of 30 minutes).

Next you've set your application timeout to 300 days and 12 hours. This too
is ... silly. As with the session timeout, the server setting is almost
certainly obscenely short by comparison (default is 2 days, as I recall).

Setting the timeout in your application to longer than is set in the server
will cause all kinds of problems, and at its basic level, "won't work". Are
these settings alone the issue behind the problem you're experiencing?
Probably not, but it exhibits that you're not familiar with how ColdFusion
works, which opens up the possibility that there are other things in your
code which in combination are causing your frustrations.

Unless you are a seasoned Ruby developer, Ruby won't solve your problems,
either. You still have to have an understanding of how Ruby works, just
like ColdFusion.

BTW, you've not said what version of ColdFusion you're using. Are you on
ColdFusion 7?  8?  9?  10?  Railo 3.x?  Railo 4?

There are a lot of folks here who would gladly help you, but you need to
provide much more detail to your configuration (and possibly code) for us
to be of much help.


On Sat, Dec 8, 2012 at 11:21 AM, Thomas Eppler <[email protected]>wrote:

>
> I switched all to Session.Loginname now, but keep getting the same
> mysterious phenomenon over and over.
> I give ColdFusion one more day, then I switch to Ruby for the rest of my
> life.
>
>
>
> -------- Original-Nachricht --------
> > Datum: Sat, 8 Dec 2012 16:54:57 +0000
> > Von: Russ Michaels <[email protected]>
> > An: cf-talk <[email protected]>
> > Betreff: Re: Client.Loginname does not work for login form
>
> >
> > I think it may be because you are dping a.cflocation, so the cookie is
> not
> > being set.
> > I would suggest using session variable instead of client variables.
> >
> > Regards
> > Russ Michaels
> > www.michaels.me.uk
> > www.cfmldeveloper.com - Free CFML hosting for developers
> > www.cfsearch.com - CF search engine
> > On Dec 8, 2012 4:19 PM, "Thomas Eppler" <[email protected]> wrote:
> >
> > >
> > > Dear CF-Friends
> > > I am standing in front of a mystery ...
> > > I am using a variable Client.Loginname, which saves always the last
> used
> > > username, which I set in the username form field, so the user does not
> > need
> > > to type it again. But that variable seems not to accept the username
> > after
> > > a successful login. I test in that way: I use a wrong username, then a
> > > correct username and password. After successfull login, I log out, and
> > in
> > > the form field I see the previously typed wrong username. I absolutely
> > have
> > > no explanation.
> > >
> > > Here are the details.
> > > I use old fashioned Application.cfm with ColdFusion nine.
> > > This contains in the beginnning:
> > >
> > >
> > > <CFAPPLICATION  NAME="myApp"
> > > CLIENTMANAGEMENT="Yes"
> > > clientstorage="Cookie"
> > > setclientcookies="Yes"
> > > SESSIONMANAGEMENT="Yes"
> > > SESSIONTIMEOUT="#CreateTimeSpan(90,12,0,0)#"
> > > APPLICATIONTIMEOUT="#CreateTimeSpan(300,12,0,0)#">
> > >
> > > <CFPARAM NAME="Client.Loginname" DEFAULT="">
> > > <CFPARAM NAME="Session.LoggedIn" DEFAULT="NO">
> > >
> > >
> > > So if Session.LoggedIn is set to "NO" it redirects to login.cfm
> > > Login.cfm contains the following:
> > >
> > >
> > > <form name="einloggen" action="logincheck.cfm" method="post">
> > >
> > > Please log in:<br>
> > > Email: <input type="text" name="fusername" size="35"
> > > value="<CFOUTPUT>#Client.Loginname#</CFOUTPUT>"><br>
> > > Password: <input type="password" name="fpassword" size="16"><br>
> > > <input type="submit" name="Log in" value="Login">
> > >
> > > </form>
> > >
> > >
> > > This leads to the logincheck.cfm file, which contains the following
> > > relevant snippets:
> > >
> > > <CFSET Client.Loginname = "#trim(form.fusername)#">
> > >
> > > <CFIF (fusername IS "#emailadresse#" and fpassword IS "#Xpasswort#" and
> > > emailadresse is not "" and passwort is not "")>
> > >     <CFSET Session.LoggedIn ="YES">
> > > </CFIF>
> > >
> > >
> > > <CFIF Session.LoggedIn IS "YES">
> > > <CFLOCATION URL="/index.cfm" ADDTOKEN="no">
> > > </CFIF>
> > >
> > >
> > >
> > >
> > >
> > > Any ideas why this code does not set the last defined Client.Loginname,
> > > but takes the previous one for the username formfield in the login
> > script?
> > >
> > > I slowly get more grey hairs ....
> > >
> > >
> > > Thanks in advance
> > > Thomas
> > >
> > >
> > >
> > >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353400
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to