“This operation requires IIS integrated pipeline mode.”

匿名 (未验证) 提交于 2019-12-03 02:45:02

问题:

I have a web application being developped on Windows 8.1, .net 4.5.1, IIS 8.5 (under Integrated AppPool), Visual Studio 2013 Over the default template that includes asp.net Identity, Owin, etc. and locally works fine.

Then I uploaded it to a windows server 2008 & IIS 7.5 (Integrated Pipeline) Host and I get:

This operation requires IIS integrated pipeline mode.

Exception Details: System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.

Stack Trace:

[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.] System.Web.HttpResponse.get_Headers() +9687046 System.Web.HttpResponseWrapper.get_Headers() +9 Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +309 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +246 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +15 Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +265 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +285 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

I have searched a lot and unable to find anything except for directing the reader to change the pipeline from classic mode to integrated mode that which I already did with no luck..

What can I do to fix the problem? Does "Microsoft.Owin.Host.SystemWeb" not like IIS 7.5, or server 2008 or me :) ?

回答1:

For anyone arriving here from searching for this error, try using Response.AddHeader instead of Response.Headers.Add()



回答2:

Your Application Pool is in classic mode but your Application need integrated mode to fire. change it to Integrated Mode:

  1. Open IIS Manager

  2. Application Pool

  3. Select pool that your app are run in it

  4. In right panel select Basic Setting

  5. Manage Pipeline Mode change to Integrated



回答3:

I was having the same issue and I solved doing the following:

  1. Go to visual studio Project properties.

  2. Select Web Tab.

  3. Select Use Local IIS Web server

  4. Check Use IIS Express



回答4:

All these answers didn't work for me.

Issue Details: I was getting the same error as mentioned in the question when I was trying to deploy my application (developed using visual studio and deployed using the folder structure created by the publish option) to a remote server.

This issue persisted after trying the above solutions. This error means the application pool to which your deployed application belongs is not in Integrated mode.

Solution:

  1. Create a new application pool with .NET 4 version selected, and Managed Pipeline mode as Integrated.
  2. Change your application's app pool to the above created one and try now.

It works!



回答5:

The way to fix this issue is not within IIS. I was trying to run my application within IIS Express within Visual Studio. I searched the web and some articles were saying to add an identity tag to the system.web tag. This is not the correct way.

The way I was able to solve this issue was to click on the project file and go to properties. Under managed pipeline, I changed the property value from classic to integrated.

This solved my issue.



回答6:

I resolved this problem by following steps:

  1. Right click on root folder of project.
  2. Goto properties
  3. Click web in left menu
  4. change current port http://localhost:####/
  5. click create virtual directory
  6. Save the changes (ctrl+s)
  7. Run

may be it help you to.



回答7:

For Visual Studio 2012 while debugging that error accrued

Website Menu -> Use ISS Express did it for me



回答8:

My bad!, you are right Lex I must have done that instead of stating that I have solved the problem in comments..

This was a strange problem since my hosts IIS shouldn't complain that it requires integrated pipeline mode when it already is in that mode as I stated in my question as :

I have searched a lot and unable to find anything except for directing the reader to change the pipeline from classic mode to integrated mode that which I already did with no luck..

Using the Levi's directives I put and on an empty aspx page and told my host what going on and asked them to fix the problem and confirm the problem using the page I uploaded... I checked very often if something has changed at the state of the page and I can see that they struggled 3-4 hours to solve it...

When I asked what they have done to solve the problem, their asnwer was kind of 'classified', since they said:

Our team made the required changes on the server

I smiled and passed. So the problem was all with my host. Thanks for all the answers.

Update: As Ben stated in the comments

  1. and

are no longer valid and they are now:

  1. and


回答9:

Those who are using VS2012

Goto project > Properties > Web

Check Use Local IIS Web server

Check Use IIS Express

Project Url http://localhost:PORT/



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!