【问题标题】:What references are required for app.RunIISPipeline() in asp.net core?asp.net core 中的 app.RunIISPipeline() 需要哪些参考资料?
【发布时间】: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


    【解决方案1】:

    由于设计更改,ASP.NET Core 应用不再支持该 API。你可以查看 GitHub repo aspnet/Hosting 问题,

    https://github.com/aspnet/Hosting/issues/323

    https://github.com/aspnet/Hosting/issues/364

    https://github.com/aspnet/Hosting/issues/491

    【讨论】:

    • @CoolBreeze 我也更新了。他们在最后一刻做出了改变。
    • hrmmm 你似乎是对的。如果确实如此,我该如何解决这个问题:stackoverflow.com/questions/35126535/…
    • @CoolBreeze,回复你的其他问题。
    猜你喜欢
    • 2012-05-15
    • 2011-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多