"This operation requires IIS integrated pipeline mode."
Asked Answered
I

11

65

I have a web application being developed 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 it works fine.

Then I uploaded it to a Windows Server 2008 using 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 am unable to find anything except for directing the reader to change the pipeline from classic mode to integrated mode, which I already did with no success.

What can I do to fix the problem? Does "Microsoft.Owin.Host.SystemWeb" not like IIS 7.5 or something?

Incontinent answered 10/3, 2014 at 22:59 Comment(7)
Is there anything else in the stack trace? No frames below HttpApplication.ExecuteStep?Fantoccini
Nope, only footer that .net framework version number : (Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067 )Incontinent
:( indeed. Weird question: if you use the Empty Web Application Project template and add a single Default.aspx with the lines <%: System.Web.Hosting.HttpRuntime.UsingIntegratedPipeline %> and <%: System.Web.Hosting.HttpRuntime.IISVersion %>, what does it output on your production server? Perhaps the runtime is misidentifying the IIS mode in use.Fantoccini
Returns False, 7.5. But it returns false what ever I set for the pipeline... I set classic it is false, I set integrated it is false too. I forwarded the problem to the host. I am waiting for a response now.Incontinent
The problem solved! Thanks. I suppose my host had problems with its system, since even I change the setting into classic or Integrated my app doesnt recognize it. I suppose your code helped me a lot to see it. PS: .Hosting. part is extra it shouldnt be there: <%: System.Web.HttpRuntime.UsingIntegratedPipeline %>Incontinent
connect the application to application pool under integreted mode f.w 4.0Anytime
check the link below, it worked for a lot of people: https://mcmap.net/q/42304/-force-iis-express-to-classic-pipeline-modePuss
I
6

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 Levi's directions, I put <%: System.Web.Hosting.HttpRuntime.UsingIntegratedPipeline %> and <%: System.Web.Hosting.HttpRuntime.IISVersion %>* 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 answer was kind of 'classified', since they said:

Our team made the required changes on the server

The problem was all with my host.

* Update: As Ben stated in the comments

  1. <%: System.Web.Hosting.HttpRuntime.UsingIntegratedPipeline %> and
  2. <%: System.Web.Hosting.HttpRuntime.IISVersion %>

are no longer valid and they are now:

  1. <%: System.Web.HttpRuntime.UsingIntegratedPipeline %> and
  2. <%: System.Web.HttpRuntime.IISVersion %>
Incontinent answered 12/4, 2014 at 17:19 Comment(1)
The System.Web.Hosting namespace doesn't appear to have the HttpRuntime class.Caddish
S
64

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

Sylvie answered 10/4, 2014 at 4:50 Comment(2)
How do I change it if my website is published in a virtual host?Whity
it's not working for.Amazement
D
59

Try using Response.AddHeader instead of Response.Headers.Add()

Disastrous answered 1/9, 2014 at 17:8 Comment(7)
This answer works if the exception was caused by adding a header. Tested with MSVS 2010 and Casinni (I think).Bobette
Where would i find Response.AddHeaderWhiny
@drexdrex - Do Have a Response object? What happens if you try Response.AddHeader("X-billpg", "is so very clever."); ?Disastrous
I dont now why where to find Response.AddHeader to change it to Response.Headers.Add(), by the way i'm using asp.net mvc5Whiny
I don't understand what code to change, since the stack trace in the question only shows standard MS library code.Grundyism
I was dealing with HttpContextWrapper and HttpResponseWrapper and this is the only thing that worked.Porter
@Disastrous alternate for Response.Headers.Remove("...? I used your solution for Response.Header.Add.Moult
T
32

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

  1. In Visual Studio, select "Project properties".

  2. Select the "Web" Tab.

  3. Select "Use Local IIS Web server".

  4. Check "Use IIS Express"

Tokharian answered 17/5, 2015 at 4:40 Comment(0)
C
9

This error means the application pool to which your deployed application belongs is not in Integrated mode.

  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.
Clipboard answered 21/7, 2016 at 17:36 Comment(0)
P
7

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.

Piddle answered 17/8, 2014 at 22:56 Comment(4)
Where exactly did you change the property? Im on VS2013 and in the project properties there is a "Web" tab but there is no "managed pipeline" property.Cadmann
Found the answer to my question above here: https://mcmap.net/q/42305/-how-to-switch-iis-developer-express-to-quot-classic-mode-quotCadmann
I changed properties setting from "Integrated" to "classic" and back to "Integrated", then saved the changes and things resumed working.Skid
Press F4 after clicking on Project Link.Duchamp
I
6

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 Levi's directions, I put <%: System.Web.Hosting.HttpRuntime.UsingIntegratedPipeline %> and <%: System.Web.Hosting.HttpRuntime.IISVersion %>* 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 answer was kind of 'classified', since they said:

Our team made the required changes on the server

The problem was all with my host.

* Update: As Ben stated in the comments

  1. <%: System.Web.Hosting.HttpRuntime.UsingIntegratedPipeline %> and
  2. <%: System.Web.Hosting.HttpRuntime.IISVersion %>

are no longer valid and they are now:

  1. <%: System.Web.HttpRuntime.UsingIntegratedPipeline %> and
  2. <%: System.Web.HttpRuntime.IISVersion %>
Incontinent answered 12/4, 2014 at 17:19 Comment(1)
The System.Web.Hosting namespace doesn't appear to have the HttpRuntime class.Caddish
P
4

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.

Parody answered 23/1, 2015 at 8:33 Comment(0)
S
4

For Visual Studio 2012 while debugging that error accrued

Website Menu -> Use IIS Express did it for me

Swiger answered 30/9, 2015 at 9:53 Comment(0)
E
3

Those who are using VS2012

Goto project > Properties > Web

Check Use Local IIS Web server

Check Use IIS Express

Project Url http://localhost:PORT/

Eighteenth answered 2/1, 2016 at 13:25 Comment(0)
F
2

GitHub solution solved the problem for me by adding

  • Global.asax.cs: Set AntiForgeryConfig.SuppressXFrameOptionsHeader = true; in Application_Start:
  • Manually add the X-Frame-Options header in Application_BeginRequest
Fleck answered 9/1, 2019 at 15:46 Comment(0)
S
1

Press F4 in your Project for the property window. Then change the pipeline mode

enter image description here

Simonsen answered 12/11, 2020 at 12:53 Comment(1)
Super Working Fine. Thanks :)Fleck

© 2022 - 2024 — McMap. All rights reserved.