Sitecore installations – tips and tricks #2

Avatar de Vinicius

As you probably know, Sitecore requires a license.xml to run and it is tied to the Sitecore web root’s data folder within a valide license on it, otherwise you won’t be able to run Sitecore at all!

However, specially when you are deploying a production environment and following the recommendations from Sitecore, which says:

“After you install Sitecore, you can increase the security if you place the following folders outside the /Website root folder: /data and /indexes”

Therefore, by doing the procedure above you might see yourself in scenario such the image below.

Sitecore Server Error in / Application Required License Is Missing Blog Vinicius Deschamps

Unlike previous versions where dataFolder variable was on web.config, Sitecore 8.1 has moved it to App_Config\Sitecore.config instead. However, accordingly Sitecore recommendation [p. 13]

“You should use App_Config/Include files instead of directly modifying the web.config file”

And I would say, let’s assume the same rule applies to Sitecore.config as both files contains many instructions for Sitecore running configuration which can save you from headaches in the future by following recommendations.

So, based on that, why don’t we have a look on App_Config\Include?

Sitecore Datafolder Config Example Blog Vinicius Deschamps

Well, seems there’s a DataFolder.config.Example…. what would be its content?

Sitecore Datafolder Config Modify Blog Vinicius Deschamps

Pretty similar what we usually see in web.config and in Sitecore.config on new versions, right? Also, as you can see inside the document, it tells us to

rename this file so that it has a .config extension

Okie Dokie!!!!

  • Stay on Sitecore_Instance\App_Config\Include path and find DataFolder.config.example
  • Select it, righ-click and choose rename
Rename DataFolder.config.example Blog Vinicius Deschamps
  • Remove everything after .config and the file is now DataFolder.config

So far, nothing has changed as dataFolder variable still points to /data and Sitecore still cannot find the license.xml there

Alright ladies and gentleman, follow me and let’s go fix IT!

  • Open Notepad and change to All Files (*.*) at the bottom right corner
Modify File Type Notepad Blog Vinicius Deschamps
  • Navigate to Sitecore\Website\App_Config\Include, choose DataFolder.config.example and click Open
Open Datafolder Config File Blog Vinicius Deschamps
  • Locate the old value /data
Modify Datafolder Data Folder Path Blog Vinicius Deschamps
  • Replace /data by the new path – C:\Inetpub\wwwroot\Sitecore\Data\
Replace Data To The New Path Blog Vinicius Deschamps
  • Save the DataFolder.config to apply the modification

Once everything is in place and modified, let’s check how are things with our Sitecore website…

Sitecore Experience Platform Fresh Installation Blog Vinicius Deschamps

… fair enough, it worked!

Cool! Thanks for reading and I’ll see you on my next post!

Tagged in :

Avatar de Vinicius

3 respostas para “Sitecore installations – tips and tricks #2”

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *