【发布时间】:2019-12-02 11:13:58
【问题描述】:
我的解决方案 NET Core 2.2 中有一个 Angular 7 文件夹。 当我使用 Visual Studio 2017 和 IIS Express 在调试模式下运行时,我可以查看网站并正确调用后端的代码 API。 因此,我在发布时选择了在 launchSettings.json 中设置的配置文件,并在我在页面中添加了 IIS 后将“bin\Release\netcoreapp2.2\publish”的内容复制到我的 Windows Server 的文件夹中,例如 http://localhost:8085/ ,以下错误:
Development Mode Swapping to the Development environment displays detailed information about the error that occurred.
The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
我在 web.config 中设置:
environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production"
这怎么可能? 提前致谢
【问题讨论】:
标签: angular asp.net-core iis