Base solution for your next web application
Open Closed

How to move all the key values of appsetting.json in azure application setting #10669


User avatar
0
shedspotter created
  • What is your product version? 10.3.0

  • What is your product type (Angular or MVC)? Angular

  • What is product framework type (.net framework or .net core)? .NET 5

Hi, We have 3 environment Development , UAT and Prodeuction and it is really hard to replace the value in appsetting.json all the time while depolying in respective envirmoment. Could you please help use to move all the value in azure app serive application setting.

Thanks


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @shedspotter

    There is no automatic way for doing this. You need to manually define your settings on Azure azure app serive application settings.

  • User Avatar
    0
    shedspotter created

    Hi @ismcagdas, Thanks for the response, okay I'll do that manuualy but what about IdentityServer and other things because in appsetting we have so many which have multiple hierarchy like : json object as well as json array. how can I add those setting in azure. can you please provide a sample for it. Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can use __ character for converting json hierarcy to a flad key, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-6.0#environment-variables