gpt4 book ai didi

c# - asp.net core 中的 app.RunIISPipeline() 需要哪些引用资料?

转载 作者:太空宇宙 更新时间:2023-11-03 12:52:18 24 4
gpt4 key购买 nike

当我尝试使用以下内容时:

app.RunIISPipeline();

Visual Studio 建议我添加 "Microsoft.AspNet.Loader.IIS": "1.0.0-beta8-15609"。如果我将其添加到我的 project.json 文件中,则会出现以下错误:

The type 'IApplicationBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'...

如果我随后将 "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final" 添加到我的 project.json 文件中。我仍然收到同样的错误。

我错过了什么?

编辑

此片段来自 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();

最佳答案

由于设计更改,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

关于c# - asp.net core 中的 app.RunIISPipeline() 需要哪些引用资料?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35123422/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com