【问题标题】:Runtime Error with Deployed ASP.NET Core MVC app; doesn't occur during debugging in VS '19已部署的 ASP.NET Core MVC 应用程序的运行时错误;在 VS '19 中调试期间不会发生
【发布时间】:2021-11-18 03:43:46
【问题描述】:

我有一个在 Visual Studio 中构建和运行的应用程序。我一直做得很好,直到今天部署的应用程序突然无法加载特定页面。当我在调试模式下通过 VS 运行应用程序时,一切都很好。

但是当我运行应用程序并尝试加载特定页面时,我在应用程序事件日志中看到以下错误:

ActionName: MapItGo_Web_App.Controllers.ShippingSchedulesController.EditRelayCalendar >(MapItGo Web App)

未找到视图“EditRelayCalendar”。
搜索地点:
/Views/ShippingSchedules/EditRelayCalendar.cshtml,
/Views/Shared/EditRelayCalendar.cshtml,
/Pages/Shared/EditRelayCalendar.cshtml

页面存在。就像我说的 - 当我在调试器中运行应用程序时,它运行良好。这对我来说完全奇怪。今天早上它运行得非常好,当时我让一位同事测试了那个特定的页面。

此应用正在部署到 MS Azure。

有什么想法吗?

【问题讨论】:

  • 不要刻薄;但是,这表明 Azure 中的某些内容是不正确的。严重依赖错误消息,因为它在 98% 的情况下都是正确的,它只是告诉您它找不到资源。如果它们在那里,那么可能是访问错误。部署后问题出现在 Azure 中。

标签: c# asp.net-core-mvc azure-web-app-service


【解决方案1】:

我曾尝试使用 Visual Studio 2019 部署的 Asp.net 核心 MVC 应用程序。我没有遇到任何类似运行时错误的问题。

请尝试clear cache 解决方案,rebuild the solution 并尝试部署到 azure。如果您仍有问题,请提出支持票New support request - Microsoft Azure

更多信息请参考here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-17
    • 1970-01-01
    相关资源
    最近更新 更多