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](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/required-license-is-missing-blog-vinicius-deschamps.png)
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](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/datafolder-config-example-blog-vinicius-deschamps.png)
Well, seems there’s a DataFolder.config.Example…. what would be its content?
![Sitecore Datafolder Config Modify Blog Vinicius Deschamps](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/datafolder-config-modify-blog-vinicius-deschamps.png)
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](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/rename-datafolder-config-blog-vinicius-deschamps.png)
- 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](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/modify-file-type-notepad-blog-vinicius-deschamps.png)
- Navigate to Sitecore\Website\App_Config\Include, choose DataFolder.config.example and click Open
![Open Datafolder Config File Blog Vinicius Deschamps](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/open-datafolder-config-file-blog-vinicius-deschamps.png)
- Locate the old value /data
![Modify Datafolder Data Folder Path Blog Vinicius Deschamps](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/modify-datafolder-data-folder-path-blog-vinicius-deschamps.png)
- Replace /data by the new path – C:\Inetpub\wwwroot\Sitecore\Data\
![Replace Data To The New Path Blog Vinicius Deschamps](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/replace-data-to-the-new-path-blog-vinicius-deschamps.png)
- 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](https://viniciusdeschamps.com.br/wp-content/uploads/2020/05/sitecore-experience-platform-fresh-installation-blog-vinicius-deschamps.png)
… fair enough, it worked!
Cool! Thanks for reading and I’ll see you on my next post!
Deixe um comentário