gpt4 book ai didi

asp.net - 将asp.net core应用程序部署到azure后出错

转载 作者:行者123 更新时间:2023-12-02 09:22:08 24 4
gpt4 key购买 nike

首次将我的 asp.net core 应用程序部署到 azure 并运行它后,出现以下错误:

Error. An error occurred while processing your request. Development Mode Swapping to Development environment will display more detailed information about the error that occurred.

Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.

请注意,我在 Visual Studio 中发布时尝试了调试和 Release模式,并确保选择了默认迁移并拥有连接字符串。如果可能的话,您能告诉我如何启用如图所示的开发模式或进一步解释该错误吗?谢谢

编辑:根据我收到的建议,我在云资源管理器日志中发现了以下内容:

Msvsmon was unable to start a server named '127.0.0.1:50867'. The following error occurred: An instance of the remote debugger is already running on this computer, or another process is already bound to the specified TCP/IP port.

最佳答案

很明显 - ASP.NET Core 2.0 中仍然出现了一些东西 - 正如 @Techy 所说 - 是在 Azure 中。转到Azure,单击您的Web应用程序 ->“应用程序设置” ->转到“应用程序设置”部分并添加“ASPNETCORE_ENVIRONMENT”和“开发”

Azure Portal

关于asp.net - 将asp.net core应用程序部署到azure后出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40696952/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com