我在IIS 10中发布Dotnet核心2.0 mvc应用程序时遇到HTTP错误502.5错误

时间:2018-05-27 07:05:08

标签: c# asp.net-core asp.net-core-mvc-2.0

我在IIS 10中发布时遇到错误。

Asp.net Mvc Core 2.0应用程序。

Error:
  An assembly specified in the application dependencies manifest (Hegic.TwoWheeler.Web.deps.json) was not found:
    package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.3'
    path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'

  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.8.xml

先谢谢你。

2 个答案:

答案 0 :(得分:0)

确保您的主机上安装了最新的.net核心运行时

.NET Core runtimes

如果问题仍然存在,请编辑项目文件并设置以下内容:

<PropertyGroup>
  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

答案 1 :(得分:-1)

上个月我遇到了502错误,但我发现自今天起我需要更新Dotnet SDK Runtime Installer版本2.0.6。

你可以找到它here (.NET Core Runtime 2.0.6 Download Page)