【发布时间】:2019-07-19 20:11:07
【问题描述】:
我的 web.config 中有这个自定义部分
<defaultUserAccounts>
<userAccount email="x@x.com" password="xxx" />
<userAccount email="y@y.com" password="yyy" />
</defaultUserAccounts>
我在 Azure 上托管我的 Web 应用程序,我希望能够在 Azure 应用程序设置中添加新的 userAccount。
我试过了:
defaultUserAccounts.userAccount.email / z@z.com
defaultUserAccounts.userAccount.password / zzz
或
defaultUserAccounts:userAccount:email / z@z.com
defaultUserAccounts:userAccount:password / zzz
但它不起作用。我可以阅读 localhost 中的 web.config 自定义部分,但不是在托管应用程序时。
你能帮我吗?
【问题讨论】:
-
一些想法,但没有找到答案。您是否打算迁移到 Core?您是否考虑过这样做更好的方法?像数据库?由于这种方法并不是真正正确的方法...docs.microsoft.com/en-us/azure/azure-app-configuration/overview
-
我们不想移动到核心。我们不想使用数据库。这种方式是我们想要的方式。我们需要在 web.config 中提供可用的用户列表。你有什么办法可以帮助我吗?