首页 > 解决方案 > localhost 和 Azure 中的不同 asp.net 核心逻辑

问题描述

我的Asp.Net Core 2.1 Razor页面网络应用程序使用Pages/Shared/_Layout.cshtml其中包含标签<partial name="_LoginPartial" />。如果它在 中运行localhost,则在发布时Azure使用 ,Pages/_LoginPartial.cshtml而不是Pages/Shared/_LoginPartial.cshtml。此外,如果我删除Pages/_LoginPartial.cshtml并部署应用程序,Azure 服务器会显示不存在的旧版本Pages/_LoginPartial.cshtml. 看起来某种缓存正在发生。我的问题是:

  1. 为什么Azure服务器不使用Pages/Shared/_LoginPartial.cshtml而不是“不存在”的页面?
  2. Pages/_LoginPartial.cshtml当服务器被删除而不是存在时,服务器从哪里得到Pages/Shared/_LoginPartial.cshtml

标签: azureasp.net-corerazor-pagesasp.net-core-2.1

解决方案


推荐阅读