OSI error when published application

Asked

Viewed 1,857 times

5

When I publish my application, the following error appears:

This Operation requires IIS Integrated pipeline mode.

Description: An unhandled Exception occurred During the Execution of the Current web request. Please review the stack trace for more information about the error and Where it originated in the code.

Exception Details: System.Platformnotsupportedexception: This Operation requires IIS Integrated pipeline mode.

I use . Net 4.5 and Mvc 4

The strange thing is that if I create an MVC 4 application using the basic and adding only one Controller and a View error does not appear.

This error only happens in hosting.

Edit:

After some tests I found that this error happens when I install in signalr 2 and create the file Startup.cs

  • Related -> http://stackoverflow.com/questions/22313167/this-operation-requires-iis-integrated-pipeline-mode

2 answers

5


Detailing

In IIS 7, there are two request processing modes for application pools: integrated mode and classic mode. When you set up an application pool with integrated mode, IIS will process requests for managed content with the new integrated IIS and the pipeline for processing ASP.NET requests. When you set up a classic-mode application pool, IIS will continue to process requests for managed content using separate IIS and pipelines for processing ASP.NET requests. Use classic mode only for applications that cannot run in integrated mode.

Step by step how to proceed.

  • Open the IIS Manager.

  • In the Connections panel, expand the server node and click Application Pools.

  • On the App Pools page, click to select an app pool from the list.

  • In the Actions pane, click Basic Settings.

  • From the Managed pipeline mode list, select Integrado

Click OK.

source

  • But why this error? Because you see, when I create a basic mvc 4 project and just add 1 controller, there is no error. Now in another application there are more references gives this error. It can be a reference?

  • Which version of IIS do you use in development and which version does the host use ?

  • I do not know, I will check... But as there are projects that work and others do not work?

0

Exploring the possibilities:

  1. It works on your local IIS and does not work on your hosting IIS. So the problem is in the project (this is clear).
  2. The error occurs by installing the signalr 2 So the problem is in this component (You could put in your question the Stack Trace, if possible).
  3. System.Platformnotsupportedexception is released, as David said, because of Pipeline Mode and according to Microsoft, by running a dll on a wrong platform (like, a 64-bit dll on a 32bist platform, or a project. Net 4.5 on a 2.0 site, or use classic pipeline instead of integrated).

Tests to verify the reason for the error:

  1. Check on your local website (your IIS) if it is 32bit enabled.
  2. Check if the Signalr 2 dll is . Net 4.5 (same as the project) and if the dll platform is the same as the project (32 or 64 bits).
  3. Check that the project is configured for Anycpu.

These tests are to ensure that your project (and references) are on the same platform permitted by the hosting site. Because Exception is clear, it refers to the platform problem.

"The Headers property is only compatible with IIS 7.0 integrated pipeline mode and at least . NET Framework 3.0. When you try to access the Headers property and any of these two conditions is not met, a Platformnotsupportedexception is launched."

Browser other questions tagged

You are not signed in. Login or sign up in order to post.