CMSGlobalFiles and CMSContext required, yet cant find good answer in documentation

Michael Davidson asked on February 19, 2015 22:21

so im trying to run the site locally, and i get an error saying i need CMSGlobalFiles and their contents. i have all the files taken directly from the live site, AND i tried using the export global files feature. the only documentation I could find was from kentico 6.0, basically saying that CMSGlobalFiles sets the user profile i think of the developer. so i tried to follow that guide that is found here, and then it told me i needed CMSContext files as well, which led me here to the forums actually.

to sum up, I want to know what the files CMSGlobalFiles and CMSContext do and how to write them myself, which apparently I need to do to run it locally..? let me know guys. thanks.

Recent Answers

Brenden Kehren answered on February 20, 2015 06:37

Maybe back up a bit and state what you're trying to do? Are you exporting your live site and trying to import into a new site?

The CMSGlobalFiles is a directory created in the root of the website MANUALLY where you can place files you want to be exportable with the site.

CMSContext is a helper class in versions 7 and older that provides access to many other objects and their properties. This would be a dll or something on that line that is missing.

Do you have access directly to the file system? That will probably answer a lot of your questions if you do.

0 votesVote for this answer Mark as a Correct answer

Michael Davidson answered on February 20, 2015 16:55

Brenden thank you very much for answering! I do happen to have direct access to the file system, so I zipped everything and brought it local through filezilla.

I then unzipped, imported into visual studio, then i try to run it locally but I get this CMSGlobalFiles not there/not valid error when I try to run it on localhost/whatever 'running' it in Chrome is really doing.

the whole point is that I want to be able to make changes on a local version, then push the updated files directly to the server like git does(at least i think thats what git does, thats what my coworkers use).

Is the CMSGlobalFiles class supposed to contain the 'Global' folder from exported data? What is it supposed to contain exactly?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 20, 2015 17:20

The CMSGlobalFiles directory doesn't need to contain anything, in fact, it doesn't even need to exist.

Since you zipped the files on the server and unzipped them on your local machine, I'd check a few of the DLLs properties in the BIN directory. Right click on one and click properties. Does it say "Unblock" down at the bottom right of the properties window? If so, you will need to unblock all those DLLs and possibly any other file that was brought over that is blocked. In v6, 7 and 8 there are anywhere from 8000 to 13000 files, of course not all of them will be blocked but you'd need to check as it could cause problems later.

OR a better solution would be to use FileZilla to just transfer the files without zipping them, probably take a lot less time.

0 votesVote for this answer Mark as a Correct answer

Michael Davidson answered on February 20, 2015 17:35

Thanks again Brenden for a speedy answer. I am going to try the second thing you recommended, but for some reason I only get the folder outside of the project instead of the wwwroot one. I'm going to try making my own wwwroot folder etc. before actually importing and we will see how that goes :-)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.