How to add configuration values in AppSettings.json in Azure functions. Is there any structure for it?

后端 未结 7 1983
别那么骄傲
别那么骄傲 2021-02-12 18:51

What is the standard structure to add keys to appsettings.json? Also, how to read those values in our run.csx? Normally in app.config, we had Con

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-12 19:18

    You don't have to use System.Environment.GetEnvironmentVariable() to access your app settings.

    ConfigurationManager is available to Azure Functions in run.csx like so:

    System.Configuration.ConfigurationManager.AppSettings["SettingName"]
    

提交回复
热议问题