简体   繁体   中英

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:

带有 RaygunSettings 部分的 Web.config

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM