Why is IIS7 suitable for classicmode handlers when the application is running in integrated mode?

I have an application in an application pool that works in integrated mode. I added a handler to system.web> httpHandlers, and I continued to get the result 404. Thus, I turned on the failed trace of the request, and in the details of the request I see that there are several of these types:

HANDLER_PRECONDITION_NOT_MATCH Name: PageHandlerFactory-ISAPI-2.0 Prerequisite classicMode, runtimeVersionv2.0, bitness32

A prerequisite is always classicMode. Why is IIS 7 trying to match the request to these handlers when the application pool is running in integrated mode?

Thanks!

+4
source share
2 answers

Your HttpHandler must be configured in the <system.webServer/> section of your web.config .

0
source

I did not find out why it was installed in classicMode by default, but this blog very well explained the various premises: http://blogs.iis.net/thomad/archive/2006/11/04/precondition-what.aspx

Here is an excerpt from the Prerequisite Mode blog:

Mode precondition

The new managed module and the extensibility of managed handlers allow you to add managed code, that is, ASP.NET pages, modules, and handlers, directly to the IIS7 pipeline. IIS7 must start the workflow in a certain way for this to work. It should download the .NET Framework 2.0 and also run a module called webengine.dll. Webengine.dll does all the work of connecting managed modules to the IIS7 pipeline because IIS7 itself does not know about managed code. A new way to integrate ASP.NET pages, modules, and handlers is called Integrated Mode.

But there is still an old way of connecting managed code in IIS7, i.e. through the ISAPI interface. ASPNET_ISAPI.DLL used this in IIS 5, 5.1 and 6.0. IIS7 continues to support ISAPI connectivity if you start the workflow in "classic mode".

As a result, IIS7 introduced two preconditions called "IntegratedMode" and "classicMode". A handler that has the "built-in method" condition associated with it will only be loaded into the application pool, which has the "IntegratedMode" property set in ApplicationPool. Handlers with the "classicMode" clause will only be loaded into application pools that have the builtMode property set to false.

0
source

All Articles