【发布时间】:2016-05-26 20:06:36
【问题描述】:
我正在尝试将仍在 ASP.NET RC1 (DNX) 上的 Web 应用程序部署到 IIS。我浏览了所有 Microsoft 文档,但我遇到了一个问题。应用程序启动时出现此错误:
Application startup exception: System.IO.FileLoadException: Could not load file or assembly 'Web' or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)
File name: 'Web' ---> Microsoft.Dnx.Compilation.CSharp.RoslynCompilationException: Startup.cs(104,39): DNX,Version=v4.5.1 error CS0012: The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
这是什么意思?我能够在我进行开发的本地机器上部署到 IIS,没有任何问题。但是,只有带有 IIS 的服务器不起作用。
我该如何解决这个错误?服务器在 Windows Server 2008 R2 上,我的本地机器是 Windows 7,如果有帮助的话。
【问题讨论】:
-
您的服务器上是否安装了 DNVM 和正确的 dnx 运行时?
-
@Tseng 我不相信我会这样做,我怎样才能确定?不过我确实有 dnx 运行时。
标签: iis asp.net-core dnx