【发布时间】:2016-02-01 05:17:02
【问题描述】:
当我尝试使用以下内容时:
app.RunIISPipeline();
Visual Studio 建议我添加"Microsoft.AspNet.Loader.IIS": "1.0.0-beta8-15609"。如果我将它添加到我的 project.json 文件中,则会出现以下错误:
“IApplicationBuilder”类型是在未引用的程序集中定义的。您必须添加对程序集的引用 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'...
如果我随后将 "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final" 添加到我的 project.json 文件中。我仍然收到同样的错误。
我错过了什么?
编辑
这个 sn-p 来自 ASP.net 5 documentation.
// Enable the IIS native module to run after the ASP.NET middleware components.
// This call should be placed at the end of your Startup.Configure method so that
// it doesn't interfere with other middleware functionality.
app.RunIISPipeline();
【问题讨论】:
标签: c# asp.net asp.net-mvc iis asp.net-core