• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

What is clientscopestorage?

New Here ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

I am upgrading an old CF 8 application to CF 10.  The first error I have encountered after upgrading is in my application.cfm and the site won't load at all.

"The client scope settings combination is invalid.  The clientscopestorage is set to use cookies, but setclientcookies is not set to yes."

What is clientscopestorage?  It's not a valid attribute of the cfapplication tag.  I can't turn up that attribute in any searches on the forums, in the documentation, nor via Google.  I tried setting loginStorage and clientStorage to settings other than cookies, just in case that's what it meant.  But that didn't work. 

I suppose I could set setclientcookies to Yes, but that's not how the application used to operate so I'd rather figure out how to fix clientscopestorage, whatever that is.

Thanks,

Tom

Views

959

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Aug 10, 2016 Aug 10, 2016

if you are using the <CFAPPLICATION> tag, then your application is using Application.cfm.  In the CFAPPLICATION tag, you can specify the "clientManagement" attribute to be true or false, and the "clientStorage" attribute to be one of the following:

  • "Registry" (the default, and should really NEVER be used),
  • A valid data source name (configured in ColdFusion Administrator)
  • Cookie

Both of these settings override whatever is set in the ColdFusion Administrator for Server Settings->Client Variables.

How

...

Votes

Translate

Translate
LEGEND ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

It isn't called clientscopestorage, but it does exist:

<cfscript>
    This.name="SearchApp";
    This.clientManagement="Yes";
    This.clientStorage="mydatasource";
</cfscript>

I cringe whenever I read a post by someone upgrading more than one generation.  Most likely you won't have too many issues, but there are some things that you should look into, esp ESAPI.

HTH,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

if you are using the <CFAPPLICATION> tag, then your application is using Application.cfm.  In the CFAPPLICATION tag, you can specify the "clientManagement" attribute to be true or false, and the "clientStorage" attribute to be one of the following:

  • "Registry" (the default, and should really NEVER be used),
  • A valid data source name (configured in ColdFusion Administrator)
  • Cookie

Both of these settings override whatever is set in the ColdFusion Administrator for Server Settings->Client Variables.

How was CF 8 configured with regard to Client Variables?

Also, I'd check is if there are any uses of the CLIENT scope in your application - search the entire code base for "client." (note the period) and "client[".  If it is not being used, then you don't need to worry about configuring it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

Carl, something you said enabled me to find the solution.  I compared the Server Settings->Client Variables on my CF8 and CF10 installations and found a difference there.  CF8 was set to Registry.  I switched CF10 to Registry and now the application works again. 

Maybe once I verify that whole thing is working in CF10 I can look into switching away from Registry.  I appreciate the advice to avoid Registry.  I don't do a lot of Cold Fusion development and this is a legacy application that was dumped in my lap, so I'm sure there's a lot I can learn. 

There are only a few uses of "client." in the code.  For the most part, they appear in application.cfm files like so:

<cfset application.addtoken="cfid=#client.cfid#&cftoken=#client.cftoken#">

What is that?  Variables for maintaining state between page requests?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

LATEST

If the only references to client are for the cfid and cftoken variables (and yes, those are to maintain connections to the session state between requests), you may be ok for now.  But I would switch the storage to either a data source or cookies as soon as possible.  If other data starts getting stored in the client scope, you can find your Windows registry growing in size at a dangerous rate.  If you are not on Windows, then ColdFusion is using a file store to "mimic" the Windows registry storage, and the performance on that file store is abysmal.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation