Set up an environment-based configuration
To set up an environment-based configuration:
-
Create a folder for each of your environments under the
<your-xp-role>/App_Data/configfolder. The following example includes the two environment specific foldersproductionanddevelopment:
-
Add environment-specific configuration files to your folders. Configuration files must start with
sc.and end with.xml.NoteYou do not need to use the same subfolder structure as the
<your-xp-role>/App_Data/Config/Sitecorefolder. -
To activate the configuration files for a specific environment, set the
configurationEnvironmentvariable in the<your-xp-role>/App_Data/AppSettings.configfile. For example, this code enables the files in thedevelopmentfolder:RequestResponse<?xml version="1.0" encoding="utf-8"?> <appSettings> <add key="configurationDirectoryRoot" value="App_Data" /> <add key="configurationEnvironment" value="development" /> </appSettings>