Try our conversational search powered by Generative AI!

The new AppData folders


We're currently setting up a CMS 7 project, trying to understand what should go into source control and how things should be deployed.

It seems Modulesbin is updated by Add-ons so I think we've got that covered. But then we have the AppData* folders. It seems they are also used for Add-ons, and to some extent the contents seem to be the same as Modulesbin. In a default installation of CMS 7, AppData is located outside the web root. What's the suggested way to handle this folder. And how should it be deployed? Should we rather put AppData inside the site? Does this folder need write perms?

Related question: the modules folder is never touched by Episerver/Add-ons - it is just for our own gadgets, like in CMS 6?

Thanks in advance!

Apr 22, 2013 16:50

Hello Johan,

The folders that might be updated by the add-ons system are:

  • Below the site root:
    • modules (for public add-ons files)
    • modulesbin (for all add-ons binaries)
  • Below the AppData folder:
    • Modules (for protected add-ons files)
    • ModulesRepository (for all installed add-ons packages)

The AppData folder should be outside the the site folder.

The "modules" folder under the site root still can be used for your own gadgets and so on.



Edited, Apr 23, 2013 9:17

So basically you're saying that all these folders are used for add-ons? Can't really see why we need four folders for this? What's the difference between public and protected add-on? So how should we set it up with source control and deploy if we want to do managed deploys? (i.e. not letting the customer update ad hoc). Having stuff outside the site root seems a bit more complicated, or is it just me?

This post suggests that modulesrepository is used for NuGet and not add-ons? Teh confusion... :-|

Apr 23, 2013 13:44

The modulesbin folder is a probing path for Add-Ons assemblies. There are several reasons to have a separate folder for Add-Ons assemblies. One of them is that Add-Ons assemblies are not mixed with the site assemblies in the bin folder. Another reason is that ASP.NET restarts the site if a new assembly is placed in the site bin folder and we would like to avoid this.

Content of public Add-Ons by default is available for any site user. Protected Add-Ons content by default is accessible only for WebEditors and WebAdmins.

ModulesRepository is a folder that contains package files only for installed Add-Ons (not NuGet packages that can be installed from Visual Studio). The package files are needed when Add-On is about to be deleted or updated, since system needs to know which files belongs to which Add-On.

Here you can find more information about the Add-Ons system:

Having some content outside the site root folder is common way to handle files in EPiServer - Global files, Page files, Admin/Edit mode UI and Add-Ons.

Apr 23, 2013 14:21

If I want to relocate ModulesRepository folder, where can I change the config for that? I have searched the entire project and it's nowhere to be found... :-|

May 22, 2013 13:49
<p>Hello Johan,</p> <p>In episerver.packaging section in the web.config there is a property repositorPath. Default value is not set explicitly in the configuration file, so you need to add this property and specify required value. You can find more information about the Add-Ons system configuration here</p>
Edited, May 22, 2013 14:00

I am having trouble with add-ons and hope you can help. What I have done so far:

Following this guide, I have successfully created a nuget package for a protected add-on. Based on the information above, I have set up my deploy procedure to deploy the assembly to wwwroot\modulesbin\ and the nuget package to appdata\Modules\MyAddOnName\. I have also updated the appdata\packages.config with an entry for my new add on.

What I have learned: The add on does not appear in the add-on list until I manually copied the nuget file to appdata\ModulesRepository\MyAddOnName\. How come? You write that the ModulesRepository folder does not contain nuget packages that can be installed from VS. Shouldn't it be sufficient to add it to the Modules folder?

My add-on is a widget/gadget. The javascript file for the gadget is located at ClientResources\Scripts\gadgets\mynamespacesecondpart\myjavascriptfile.js (mynamespacesecondpart is part of the namespace I have created). When I access CMS->Edit on the site, I get a blank screen. I debug it with Firebug I find that the JS file is referenced at http://mysite:17000/episerver/Shell/3.0.1209/ClientResources/mynamespacefirstpart/mynamespacesecondpart/myjavascriptfile.js. Why is it referencing a path in another module?

Edited, Apr 21, 2015 11:30

Hello Esben,

Regarding the ModulesRepository, the package is needed for Add-On system to know about all files related to the Add-On (for example all Add-Ons assemblies placed to modulesbin, not Modules folder).

Regarding your widget, probably your need to add a reference to your dojo module in the Add-Ons module.config (see here):

    <add name="MyAddOn" path="ClientResources\Scripts" />
Apr 21, 2015 15:48

Okay, so now I have the following:

  • Nuget package deployed to \appdata\ModulesRepository\MyAddOn\MyAddOn.
  • DLL deployed to \wwwroot\modulesbin\MyAddOn.dll
  • Dojo module registered in \wwwroot\module.config as

<add name="mynamespace_part1" path="Scripts/gadgets" />


In my module VS project, the JS-file that defines the module is located in /ClientResources/Scripts/gadgets/mynamespace_part2/MyAddOn.js

When I visit the CMS Edit tab in the episerver interface, I just get a blank screen (the add-on is to be inserted as an assert). Debugging with Firebug, I can see the last request from the page is a request for the JS-file which fails with 404 not found. The request is http://mysite:17000/ClientResources/Scripts/gadgets/mynamespace_part2/MyAddOn.js.

So, although I have deployed my module to ModulesRepository, the loader is looking inside the wwwroot folder. What am I missing?

EDIT: If I add the JS-file manually to the requested location, everything works. But if that is needed, it doesn't make sense to have as a part of the Nuget package. So that is not an option.

Edited, Apr 23, 2015 15:34

Dojo module should be registered in module.config of your Add-On. Add-Ons module.config is placed in the Add-Ons root folder. In your case, I guess, it will be wwwroot\modules\MyAddOn\module.config 

Apr 23, 2015 15:46

Okay, so I have now added module.config to wwwroot\modules\MyAddOn\, with the content stated above. I still get a 404 but now it requests http://mysite:17000/modules/MyAddOn/Scripts/gadgets/mynamespace_part2/MyAddOn.js. I guess the path (Scripts/gadgets) given in module.config is incorrect? How can I refer to the JS found in my Nuget module?

Sorry, but I am a bit confused about this add-on architecture.

Edited, Apr 23, 2015 16:13

The path parameter, specified in the module.config should be relative to the Add-Ons root folder. Here is a good explanation about it:

Apr 23, 2015 16:32

Yeah, but the article does not explain how to refer to a module that is outside the wwwroot, which it is in my case, as the Nuget package is located in /appdata/MyAddOn/.

With the information from the article, my understanding of the situation is now this: My module.config declares a base namespace called 'mynamespace_part1' and sets up a virtual path to 'Scripts/gadgets'. In my definition of the widget, I gave the namespace as 'mynamespace_part1.mynamespace_part2'. According to the article, this should make the loader look for the file in ClientResources/Scripts/gadgets/mynamespace_part2. But as the module.config file is located in wwwroot/modules/MyAddOn/ it seems to be looking in wwwroot/modules/MyAddOn/Scripts/gadgets/mynamespace_part2 and not in ClientResources.

Is something missing from my module.config to point to the ClientResources found in my Nuget package? Can you explain where this ClientResources folder of my Nuget package is found virtually to the site?

Apr 23, 2015 16:51

Which version of EPiServer are you using? There were some changes in Add-Ons deployment, so the blog post about dev environmnet for Add-Ons might be outdated.

Apr 24, 2015 10:20

I am using 7.5. I finally got it to work with the following setup:

  • Using MSBUILD to copy the contents of my add-on to appdata\Modules\MyAddOn
  • Including a module.config in the above MyAddOn folder with the contents below
  • Using MSBUILD to publish the dll to wwwroot\modulesbin
<module productName="MyAddOn" clientResourceRelativePath="ClientResources" loadFromBin="false">
    <add assembly="MyAddOn" />
    <add name="mynamespace_part1" path="Scripts/gadgets" />

Now it works, and the JS file is referenced to as http://mysite:17000/episerver/MyAddOn/ClientResources/Scripts/gadgets/mynamespace_part2/MyAddOn.js (where episerver is the virtual path of the EPiServer interface on my site)

Apr 24, 2015 16:34
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.