By default, Sitefinity CMS stores its configuration files in Auto mode. This means that the website configuration are stored in the database, while system settings are saved on the file system to ease making config transformations. For more information about Sitefinity CMS configuration files storage, see Auto-storage mode of configurations.
When setting up Continuous Delivery (CD) pipeline for your Sitefinity CMS website you usually work with multiple environments. For example, code changes get deployed to an Integration environment, then promoted to Staging, and finally to Production. In such setup, the code base does not change, however your website configurations might need to vary to reflect different environment settings, like connection strings, SMTP settings, and so on. While config transformations is one way of handling the need to have different configuration settings for each environment, Sitefinity CMS enables you to leverage Continuous Delivery pipelines environment variables to easily define and manage the transformations for each environment.
To facilitate managing configuration settings transformations via Continuous Delivery pipelines environment variables, Sitefinity CMS enables you to store configuration setting values in the website web.config <appSettings> section. This is made possible via exposing a specific key for each configuration setting. The key for each configuration can be obtained in the Advanced Settings UI of your Sitefinity CMS website backend. When you add this key in your website web.config <appSettings> section, and set the desired value, Sitefinity CMS starts reading the value from <appSettings> instead of the default location. From this point on you can configure the configuration setting value transformations via Continuous Delivery pipelines environment variables, the same way as any other web.config value.
To start storing a configuration setting value in the web.config <appSettings> section, perform the following:
NOTE: The parameters passed to the environment variable configuration are case sensitive and must be configured using camel case, as displayed in the example below.
As a result, your Sitefinity CMS website now reads the value of the configuration setting from the web.config file.
NOTE: Once you use Path to configuration property to store configuration values in the web.config <appSetting> section, you can no longer edit the configuration setting value from the Sitefinity CMS Advanced Settings UI.
Advanced Settings will now display the path to configuration property in the textbox for setting the configuration value along with an informative message that the value of this config settings is defined externally:
This mechanism prevents accidental override of the transformation values defined in your CD pipeline. To reverse this behavior to the default one, you can simply remove the entry from your web.config <appSettings> section.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important