【发布时间】:2021-11-25 13:03:20
【问题描述】:
我在Azure 上部署并运行了一个AppService。它连接到Google Cloud PostreSQL 数据库并且没有问题。
为了从appSettings.config 中删除连接字符串,我想使用Azure 连接字符串,应该覆盖appSettings.config 值。我写了 should 因为我这样做了,但是 Azure 中设置的值被完全忽略了。
这是我的应用设置:
{
"ConnectionStrings": {
"postgres": "Host=XX.XX.XXX.XXX;Database=production;Username=portal;Password=myPassword"
}
}
正如我之前提到的,它正在运行。如果我添加一个值postgres 和值"Host=XX.XX.XXX.XXX;Database=production;Username=portal;Password=wrongPassword",它仍然有效,即使它不存在。
我错过了什么?
【问题讨论】:
标签: azure-web-app-service connection-string