IIS 7 and Above
Configuration & Scripting
Does preCondition="integratedMode" for <handlers> have any impact?
Last post Feb 22, 2009 01:25 AM by anilr
Feb 21, 2009 05:24 PM|Ben Amada|LINK
reading that when running in classic mode, <handlers> and <modules> are ignored. Instead, the <httpHandlers> and <httpModules> sections are used.
If this is true, would specifying a preCondition of integrated for <handlers> or <modules> make any difference since these handlers/modules will only be used in integrated mode anyways? I'm thinking a preCondition of integrated for handlers and modules is
Feb 21, 2009 11:29 PM|anilr|LINK
Actually, handlers and modules sections are used in both integrated and classic modes, httpHandlers and httpModules sections are only used in classic mode. managed modules in modules section however do not need an integratedMode pre-condition since they
never get executed in classic mode because webengine itself has pre-condition of integratedMode - however managed handler do need that pre-condition so as to be able to pick the right handler out of several.
Feb 22, 2009 01:17 AM|Ben Amada|LINK
Hi Anil, thanks for the response.
In my scenario, I have some .NET handlers I want to register in the web.config file. Since they are .NET handlers, I presume they are 'managed' handlers.
If I'm running the site in integrated mode, in which scenario would the integratedMode pre-condition be necessary for managed handlers? I wasn't sure what you meant by needing this pre-condition "so as to be able to pick the right handler out of several".
What are the other choices?
Do you mean if I had the same 'path' defined twice in the <handlers> section ... once for integrated mode and once for classic mode ... then the integratedMode pre-condition would be necessary?
Feb 22, 2009 01:25 AM|anilr|LINK
If you do not want a particular item in your handlers collection to be used in classic mode, you need to put an integratedMode pre-condition on it.