Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"This operation requires IIS integrated pipeline mode."

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?

like image 486
wooer Avatar asked Mar 10 '14 22:03

wooer


People also ask

What is IIS integrated pipeline mode?

Pipeline mode refers to how a Web server processes client requests. IIS 7 offers two pipeline modes. Integrated pipeline mode handles all requests through a unified pipeline because of the integration of ASP. NET's runtime with the Web server.

How do I change the pipeline mode in IIS?

Once inside IIS Manager, Select Application Pools in the left pane. Once selected, the application pools available for your web server will be displayed on the right. To toggle the Management Pipeline Mode setting for this application pool, simply double click the application pool.

How do I change managed pipeline mode in Visual Studio?

option-1: In Visual Studio goto WebSite/WebApplication properties and change Managed Pipeline Mode to 'Classic'. option-2: Open %userprofile%\documents\iisexpress\config\applicationhost. config and locate your site in "Sites" section and change the app pool to classic (say Clr4ClassicAppPool ).


2 Answers

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

like image 161
Mohammadreza Avatar answered Sep 27 '22 18:09

Mohammadreza


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

like image 45
billpg Avatar answered Sep 27 '22 17:09

billpg