Manage the configurations


Your Sitefinity Cloud website is configured in a Continuous Delivery (CD) pipeline setup. This way, code changes are deployed to Staging and then to Production. In such setup, the code base does not change, but your website configurations may need to vary to reflect different environment settings, such as connection strings and SMTP settings. 

To utilize web.config transformations, Sitefinity Cloud uses the same approach as described in procedure Manage configurations in Continuous delivery.

When you need to apply different configurations for the different environments, there are two options to do so, depending on the value type of the configuration itself.

Transform sensitive information

When you need to transform configurations that store sensitive information, you can use environment variables. You enter the desired values as key-value pairs in the variable group, designated for the specific environment:

  • Staging: _CUSTOMER_Staging_Variables
  • Production: _CUSTOMER_Production_Variables

You edit the environmental variables in the Variable groups:


To add a variable, perform the following:

  1. Click the desired variable group.
  2. In the Variables section, click Add.
  3. Fill out the Name and the Value.
    Use the same approach as described in procedure Manage configurations in Continuous delivery.
  4. You can make a variable value secret by clicking the padlock icon.


  5. Open the web.config and add the variables in the <appSettings> section.
    Use the following example:

    During deployment pipeline searches the web.config for the input key and replaces its value with the value from the pipeline variable for the specific environment.

Transform non-sensitive information 

  1. Open your project in Visual Studio.
  2. In the Configuration manager, add the Staging and Production configurations:


  3. Open the context menu of the web.config file and click Add Config Transform.
  4. Add the web.Production.config and web.Staging.config transformations.
  5. To include the transformations in the deployment package, set their build action to Content.
EXAMPLE: Following is an example of the production transformation of a web.config file:

RESULT: During deployment Staging and Production transforms will be applied to the web.config. 

Was this article helpful?