Your Sitefinity Cloud website is configured in a Continuous Delivery (CD) pipeline setup. This way, code changes are deployed to non-Production environments like Staging first, 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 app settings transformations, Sitefinity Cloud uses the approach of configuring the app settings in the Azure App Service, which override the ones in the web.config and appsettings.json.
web.config
appsettings.json
To create custom app settings for different environments, perform the following:
$(<NameofSecretinKeyVault>)
DefaultEndpointsProtocol=https;AccountName=$(MediaLibraryStorageName);AccountKey= $(MediaLibraryStorageKey)
NOTE: If you want your app settings to apply for all environments, add the settings in Custom Release AppSettings variable group.
To create different connection strings for different environments, perform the following:
data source=tcp:$(ServerName).database.windows.net,1433;User ID=$(ServerUserName); Password=$(ServerPassword);initial catalog=$(DatabaseName);Persist Security Info=False; MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Backend=SqlAzure;SF_ignoreDowngradeExceptions=true;
NOTE: If you want your connection strings to apply for all environments, add the settings in Custom Release ConnectionStrings variable group.
To utilize app settings transformations, the .NET Core Renderer application uses the approach of configuring the app settings in the Azure App Service, which override the ones in the appsettings.json.
NOTE: Because the .NET Core Renderer Application is deployed on Linux Web Apps, any nested JSON key structure in the app setting name, such as ApplicationInsights:InstrumentationKey needs to be configured in App Service as ApplicationInsights__InstrumentationKey for the key name. The convention is that each : (colon) must be replaced with __ (double underscore).
JSON
ApplicationInsights:InstrumentationKey
ApplicationInsights__InstrumentationKey
:
__
NOTE: If you want your app settings to apply for all environments, add the settings in Custom Release DotNetCoreRenderer AppSettings variable group.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important