IIS error when published application

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 basic and adding only a Controller and a View error does not appear .

This error only happens in the hosting.

Edit:

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

    
asked by anonymous 07.09.2015 / 15:12

2 answers

5

Detlhes

  

In IIS 7, there are two modes of request processing for application pools: integrated mode and classic mode. When you configure an application pool with integrated mode, IIS will process requests for managed content with the new built-in IIS and the pipeline for handling ASP.NET requests. When you configure an application pool with Classic mode, IIS will continue to process requests for managed content by using separate IIS and the pipelines for processing ASP.NET requests. Use classic mode only for applications that can not be run in integrated mode.

Step by step how to proceed.

  • Open IIS Manager.

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

  • On the Application Pools page, click to select an application pool from the list.

  • In the Actions pane, click Basic Settings.

  • From the Managed Pipeline Mode list, select Integrado

Click OK.

Font

    
10.09.2015 / 18:54
0

Exploring the possibilities:

  • Works on your local IIS and does not work on IIS hosting. So the problem is in the design (this is clear).
  • The error occurs installing signalr 2 So the problem is in this component (You could put your Stack Trace in your question, if possible).
  • System.PlatformNotSupportedException is thrown, as David said, because of Pipeline Mode and according to Microsoft, by running a dll on a wrong platform (type, a 64 bit dll on a 32bist platform, or a .Net 4.5 project in a 2.0 site, or use classic pipeline instead of integrated).
  • Tests to check the reason for the error:

  • Check your local site (your IIS) if it is 32bit enabled.
  • Verify that the Signalr 2 dll is .Net 4.5 (same as the project) and that the dll platform is the same as the project (32 or 64 bit).
  • Verify that the project is set to AnyCpu.
  • These tests are to ensure that your project (and referrals) are on the same platform as the hosting site allows. Because the exception is clear, it refers to the platform problem.

    " "

        
    16.09.2015 / 22:27