我們都知道 Production 的設定檔應該要放在 Azure App Service 或是其他相關的地方,不應該將該設定檔簽入到版控中,但是,當愈到這種設定檔時,App Service 該如何設定呢?
1 | "AzureAdB2C": { |
在 .NET Core 的程式碼內,可以透過 : 的方式取得階層型態的設定檔,例如 AzureAdB2C:Instance,但是在 Linux 的 App Service 是不能使用冒號,所以要用兩個底線代替冒號
In a default Linux container or a custom Linux container, any nested JSON key structure in the app setting name like
ApplicationInsights:InstrumentationKeyneeds to be configured in App Service asApplicationInsights__InstrumentationKeyfor the key name. In other words, any:should be replaced by__(double underscore).
