【发布时间】:2017-03-10 01:02:16
【问题描述】:
我想在我的 Azure Web 应用的应用设置下设置一个键值对。
我已经尝试了许多不同的方法来在我的 appsettings.json 上设置它,但是它们都不起作用。
这是我尝试过的:
测试 1
{
"APPSETTING_WEBSITE_TIME_ZONE": "E. South America Standard Time",
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
}
}
还有
{
"AppSettings:WEBSITE_TIME_ZONE": "E. South America Standard Time",
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
}
}
另一个测试
{
"AppSettings": {
"WEBSITE_TIME_ZONE": "E. South America Standard Time"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
}
}
【问题讨论】:
-
不确定我是否关注。 Web App 的应用设置会覆盖 appsettings.json 中的设置,而不是相反。这些不会在那里显示。
-
其实用Kudu检查,我在azure上的App Settings变量其实是环境变量。但无论如何,我想直接从 appsettings 设置它们,而不是通过门户。
标签: azure asp.net-core azure-web-app-service