>I have a question regarding the application.cfm settings for client
>variable management when clustering.
>
>I'm working on an application that I need to maintain user state in.
>I want to use cfcookie to set a cookie on the user's machine that
>stores a unique key to identify this user by when his browser is
>open. But I want this model to work in a clustered environment
>as well as a shared hosting environment. I'm not worried about
>the extra overhead required to use cookies versus session vars.
>I just want to know exactly what my cfapplication tag needs to
>look like.
>
>e.g.
>
><cfapplication name="Intranet Module"
> clientmanagement="Yes"
> setclientcookies="Yes"
> ClientStorage="Cookie">
>
>Would this application setting work both on a single server as well
>as a clustered application? The user will not be tied to a specific
>machine when we cluster and all permissions for the user will be
>obtained from the application specific database.
>
>Any help would be much appreciated. Especially if you are currently
>running a clustered application or have experience with clustering
>servers and maintaining state.
>
Some answers:
1. Your ClientStorage attribute should be pointing to the datasource you
have set up to store your client variables. By setting it is "Cookie," you
are telling CF to store all your client variables in a cookie, which is not
what you want. CF will automatically set the cookie containing the unique
CFID/CFTOKEN value to identify the user. The CFAPPLICATION tag takes care of
that for you "under the hood."
2. In a clustered environment, it's recommended that you also use the
SetDomainCookies attribute, and set its value to "Yes." By definition, this
attribute sets the CFID and CFTOKEN cookies for a domain, not just a single
host.
So, effectively, your CFAPPLICATION tag should look something like this:
<cfapplication name="Intranet Module"
ClientManagement="Yes"
ClientStorage="YourClientVarDatasource"
SetClientCookies="Yes"
SetDomainCookies="Yes">
This setup will work both on a single server and in a clustered environment.
3. One last point, though I'm sure you already know this, make *sure* you
remove all SESSION variable references in your code!
Hope this helps,
Dave.
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
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