Search code examples
azureweb-configazure-web-app-serviceraygun

How do I configure an Azure App Service setting that isn't in the <appSettings> section of the web.config?


I'm using deployment slots in an Azure App Service and overriding several web.config values by using Application Settings in each slot.

I have a setting for Raygun, an error tracking service that is in a special section of the web.config. The Raygun key is stored in a <RaygunSettings> section.

The Azure section for Application settings corresponds to key-value pairs in the <appSettings> section.

Connection strings correspond to named connection strings in the <connectionStrings> section.

Here is a screen shot of a web.config file that illustrates the issue I'm trying to resolve:

Web.config with RaygunSettings section

How can I override the RaygunSettings section in the Azure App Service Application Settings?


Solution

  • This is not possible from within the Azure app settings page. See: How to override web.config values in custom section in Azure Web App?

    An alternative would be to set this in your deployment pipeline. For example: This can be done using a variable in the release stage, if you use Azure Dev Ops.

    Other pipelines will have their own methods too.