-1

net core application. I am deploying it in app service using azure. I have created my app service using arm template and I have passed all the app settings value in arm template itself. Also I deployed my application. I have appsettings.json file which also includes all the configuration with values. When I deploy my code through azure release I get the error ##[error]Error: Failed to update App service 'WebApi' application settings. Error: BadRequest - AppSetting with name 'AzureAd:Authority' is not allowed. (CODE: 400)

I am trying to understand couple of things here. When we deploy application to app service which configuration it will take? One from my code or from app service configurations? Second one is what happens if I pass configurations in both arm template and code? Can someone help me to understand this? Any help would be greatly appreciated. Thanks

Niranjan godbole
  • 721
  • 3
  • 13
  • 28

1 Answers1

0

Setting app settings in App Service are like setting them in <appSettings> in Web.config or appsettings.json, but the values in App Service override the ones in Web.config or appsettings.json.

You can keep development settings (for example, local MySQL password) in Web.config or appsettings.json, but production secrets (for example, Azure MySQL database password) safe in App Service. The same code uses your development settings when you debug locally, and it uses your production secrets when deployed to Azure.

You can refer to this document.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25