我已经从VSTS部署了一个ASP.NET Core 2.1应用程序,其中包含"Azure App Service Deploy".版本4.该应用程序正在运行,但在读取应用程序设置变量时具有运行时异常.原因是应用程序使用的这些变量存储在appsettings.json中.
I have deployed one ASP.NET Core 2.1 app from VSTS with "Azure App Service Deploy" version 4. The app is running but has runtime exception at reading application setting variable. The reasons is these variables used by app are stored in appsettings.json.
我对这些设置变量感到困惑.
I am confusing for these settings variables.
1)asp核心应用是否读取了应用程序设置"? variabes,而不是appsettings.json?我测试过,这是真的,但不知道为什么.
1) Does asp core app read "Application settings" variabes rather than appsettings.json? I tested, it is true but don't know why.
2)如何以天蓝色将asp核心应用程序配置为读取appsettings.json,而不是从应用程序设置"中读取.
2) How to configure asp core app in azure to read appsettings.json rather than from"Application settings".
谢谢.
推荐答案
您能否检查appsettings.json是否已真正部署,因为本文建议通常将其忽略:
Can you check if the appsettings.json has actually been deployed, as this article suggests it is usually ignored:
blogs.msdn.microsoft/waws/2018/06/12/asp-net-core-settings-for-azure-app-service/
感谢
更多推荐
Azure ASP.NET Core 2.1应用程序不读取appsettings.json(与VSTS一起部署)
发布评论