U4-10810 - Update CDF to support storing TEMP files in environment %temp% location

Created by Shannon Deminick 09 Jan 2018, 02:49:11 Updated by Jeavon Leopold 24 Jan 2018, 10:41:41

Tags: Unscheduled

Subtask of: U4-9609

When the appSetting umbracoLocalTempStorage is set to EnvironmentTemp we want CDF to also store it's temp files in the EnvironmentTemp (%temp%) folder. During Umbraco startup we should be able to replace the default CDF locations with this custom one.


Shannon Deminick 09 Jan 2018, 02:56:51

The changes in CDF are here: https://github.com/Shazwazza/ClientDependency/compare/d62321a7cdfe4bc044ddb37c14219e26acb52b7d...71a75da56dddc3e5327e7c0edb5f82be47a8af7b?w=1

There's a beta released on Nuget here: https://www.nuget.org/packages/ClientDependency/1.9.4-beta03

A PR to patch Umbraco CMS is here: https://github.com/umbraco/Umbraco-CMS/pull/2374


  • Delete the ~/app_data/temp/clientdependency folder, change debug=false in web.config, navigate in the back office, ensure it works and that the files are created in ~/app_data/temp/clientdependency.
  • Change to debug=true and make sure everything still works too
  • In your windows file browser, type %temp% in the address bar and enter, this will bring you to your current env temp folder
  • Delete the ~/app_data/temp/clientdependency folder, add the appSetting: umbracoLocalTempStorage and set it to EnvironmentTemp, change debug=false and navigate to the back office, ensure there are no folder/files created at ~/app_data/temp/clientdependency and then have a look at your %temp% folder, you should now see this path: UmbracoData/{SOME-LONG-ID}/ClientDependency and it should have the files there

Claus Jensen 09 Jan 2018, 08:06:26

Code looks good and I've confirmed that the folders show up in temp instead of App_Data.

@Shandem How do we do the merge here .. I'm assuming you would want to release the updated CDF on NuGet and then I can update the dependency in the Core PR to point to that instead of the beta?

Shannon Deminick 10 Jan 2018, 00:59:07

Cool, as you seem happy with this, i'll release a new CDF and update this PR with the correct changes and you can merge :)

Shannon Deminick 10 Jan 2018, 01:25:38

All pushed and ready for review/merge :)

Jeavon Leopold 23 Jan 2018, 11:59:04

After this update and without the umbracoLocalTempStorage appsetting I am getting a -map.xml file being created in "App_Data\ClientDependency" whilst the .cdJ & .cdC files are being created in the "App_Data\TEMP\ClientDependency" folder.

The -map.xml is also created in "App_Data\ClientDependency" even when umbracoLocalTempStorage has the value EnvironmentTemp.

Is this expected?

Claus Jensen 23 Jan 2018, 12:25:03

I'm pretty sure we'd want everything to go in the TEMP folder... that must be an oversight.

Claus Jensen 23 Jan 2018, 12:32:36

@Shandem could you confirm if this needs to be updated so we can get an issue created for updating CDF and the dependency in Core

Shannon Deminick 23 Jan 2018, 18:00:31

This is a bug, sorry. You can see the thread here: https://github.com/Shazwazza/ClientDependency/issues/133#issuecomment-359783330

I've just published a CDF 1.9.6 which you can update to from Nuget to resolve the problem and will update the core now to use the latest.

Jeavon Leopold 24 Jan 2018, 10:41:41

Great, thanks @Shandem

Priority: Normal

Type: Task

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.8

Due in version: 7.7.9

Sprint: Sprint 76

Story Points: 1

Cycle: 7