IIS 中的错误 运行 ASP.net CORE 1 项目

Error running ASP.net CORE 1 project in IIS

我最近使用默认模板创建了一个非常简单的 ASP.net CORE 1 应用程序。我将它发布到一个目录并在 IIS 中为其创建了一个新网站。测试连接到该站点,它工作正常!太棒了!

我采用了相同的代码并将其部署到我的测试服务器,但得到了截然不同的结果。我得到一个错误:

HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port

导致问题的两台机器之间的主要区别是什么?

查看 Windows 事件日志,我看到了这个错误:

Failed to start process with commandline '"dotnet" .\tester.dll', ErrorCode = '0x80070002'.

从 dot net core RC1 开始,您需要安装 windows server 托管库。 (假设这里是 IIS)

它没有很好的文档记录,但在安装它之后,您只需重新启动 IIS 就可以了。

确保在安装 DotNetCore WindowsHosting 时可以访问 Internet,因为安装程序会下载 VS 2015 resist x64 作为依赖项。

VS 2015 抵抗 x64 - http://download.microsoft.com/download/8/c/b/8cb4af84-165e-4b36-978d-e867e07fc707/vc_redist.x64.exe