<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>David Wang : IIS7</title><link>http://blogs.msdn.com/david.wang/archive/tags/IIS7/default.aspx</link><description>Tags: IIS7</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>HOWTO: PreCondition an ISAPI Extension DLL</title><link>http://blogs.msdn.com/david.wang/archive/2008/10/30/howto-precondition-an-isapi-extension-dll.aspx</link><pubDate>Fri, 31 Oct 2008 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9025890</guid><dc:creator>David.Wang</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/david.wang/comments/9025890.aspx</comments><wfw:commentRss>http://blogs.msdn.com/david.wang/commentrss.aspx?PostID=9025890</wfw:commentRss><wfw:comment>http://blogs.msdn.com/david.wang/rsscomments.aspx?PostID=9025890</wfw:comment><description>&lt;H3&gt;Question:&lt;/H3&gt;&lt;SPAN style="COLOR: #008000; FONT-FAMILY: Courier New"&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;We have a legacy x64 ISAPI extension that runs without problems in Win 2003 64bit - IIS 6.0.&lt;/P&gt;
&lt;P&gt;But in Win2008 EBS Security Manager setup, IIS 7.0 Default Application Pool's WOW64 / Enable32BitApp property is enabled by default, and this makes x64 ISAPI extension DLL to fail loading.&lt;/P&gt;
&lt;P&gt;By setting the Enable32BitApp option as false in application pool settings, the problem gets resolved.&lt;/P&gt;
&lt;P&gt;However we want to speicify ISAPI extension explicitly to be loaded as x64 module using "precondition='bitness64' " settings like ISAPI filters, so that ISAPI extension works no matter what application pool is configured for (x64 only, or both x64 and x86)&lt;/P&gt;
&lt;P&gt;Could anyone please suggest how we can do this or the app cmd that would allow us to do it.&lt;/P&gt;&lt;/SPAN&gt;
&lt;H3&gt;Answer:&lt;/H3&gt;
&lt;P&gt;Technically, preConditions only apply on a per-GlobalModule, per-Module, per-Handler, or per-ISAPI Filter basis. This is because globalModules, modules, handlers, and ISAPI Filters have to be explicitly configured within IIS to function. ISAPI Extensions simply need to be dropped into a web-accessible folder and then "allowed to execute" via Executable execution permission and IsapiCgiRestriction. There is no per-ISAPI Extension configuration to stick preConditions.&lt;/P&gt;
&lt;P&gt;However, as I will illustrate shortly, it is STILL possible to&amp;nbsp;apply preConditions on a per-ISAPI Extension basis in a fairly clean and clear manner.&lt;/P&gt;
&lt;P&gt;Some people would propose that it would be nice to stick&amp;nbsp;preCondition onto IsapiCgiRestriction since it is a sort of per-ISAPI Extension configuration, but IsapiCgiRestriction is really a security configuration which we hardly want to preCondition. Besides, what happens if notListedIsapisAllowed="true" and we still want to preCondition an ISAPI Extension - now we have to add a bogus entry for preCondition? Anyways, this is getting complicated very quickly, a sure sign that the proposed design has some fundamental logical flaw.&lt;/P&gt;
&lt;H4&gt;Common Misconceptions about Bitness and preConditions&amp;nbsp;&lt;/H4&gt;
&lt;P&gt;Now, before I get into how to setup per-ISAPI Extension preCondition, I want to clarify some of the misconceptions in your question about Bitness and preCondition. Using preCondition="bitness64" does NOT:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Explicitly load an ISAPI Extension as x64 module&lt;/LI&gt;
&lt;LI&gt;Make an ISAPI work no matter what the application pool is configured for&lt;/LI&gt;
&lt;LI&gt;Allow "both x64 and x86" of ANYTHING&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;A preCondition is a simple filtering mechanism on the affected IIS configuration. What preCondition="bitness64" means is that the affected configuration is ONLY applicable in a 64bit Application Pool.&amp;nbsp;A 64bit Application Pool will only see globalModule, module, handler, and isapiFilter with either bitness64 or no bitness preCondition. It will not see any globalModule, module, handler, and isapiFilter configuration with the bitness32 preCondition.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Thus, a preCondition does NOT cause an ISAPI to be explicitly loaded as any bitness. LoadLibrary() will just load the resolved DLL name into the process's address space, and if the bitness do not match, fail. Likewise, it cannot make the ISAPI work no matter what, because if the bitness does not match, it fails. Finally, Windows does not allow both 32bit and 64bit code to co-exist in the same process, and IIS does not allow an Application Pool to be both 32bit and 64bit.&lt;/P&gt;
&lt;P mce_keep="true"&gt;What is a correct way to use the bitness preConditions? Check out the various pre-defined "-64" handlers when ASP.Net Feature support is installed. For example, the svc-ISAPI-2.0 and svc-ISAPI-2.0-64 handlers. Notice that the bitness32 preCondition applies to a 32bit ISAPI, and bitness64 preCondition applies to a separate 64bit ISAPI. This dual configuration allows the same feature to work with both 32bit and 64bit Application Pools with no additional configurations changes in-between. Remember how you had to run aspnet_regiis.exe from the correct Framework bitness directory every time you changed Application Pool bitness with .Net Framework 2.0 on IIS6 in 64bit Windows, or else you would see 503 Service Unavailable failure? No longer necessary with preConditions on IIS7 and things just work!&lt;/P&gt;
&lt;H4&gt;PreConditioning an ISAPI Extension DLL&lt;/H4&gt;
&lt;P&gt;As I mentioned earlier, per-ISAPI Extension preCondition can be accomplished by leveraging preCondition support of handlers. The following configuration shows how to request an ISAPI Extension name "MyISAPI.dll" and have it work no matter the bitness of the Application Pool. It requires a 32bit version and 64bit version of the same DLL, named MyISAPI32.dll and MyISAPI64.dll, respectively.&lt;/P&gt;&lt;PRE&gt;&amp;lt;handlers&amp;gt;
  ...
  &amp;lt;add name="MyISAPI-64" path="MyISAPI.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\inetpub\wwwroot\bin\MyISAPI64.dll" resourceType="File" requireAccess="Execute" preCondition="bitness64" /&amp;gt;
  &amp;lt;add name="MyISAPI-32" path="MyISAPI.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\inetpub\wwwroot\bin\MyISAPI32.dll" resourceType="File" requireAccess="Execute" preCondition="bitness32" /&amp;gt;
  ...
&amp;lt;/handlers&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Looking at the key configuration details:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Having two handlers, one with bitness32 preCondition on the 32bit MyISAPI32.dll, the other with bitness64 preCondition on the 64bit MyISAPI64.dll, assures that only one of these handlers with the correct bitness apply to any given Application Pool&lt;/LI&gt;
&lt;LI&gt;path="MyISAPI.dll" means that end consumers only request /MyISAPI.dll while the dynamic 32/64bit wiring happens underneath the covers via the bitness preCondition&lt;/LI&gt;
&lt;LI&gt;requireAccess="Execute" makes Execute permissions necessary to execute an ISAPI Extension DLL in a given URL namespace&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;The combination of preConditions, path-remapping, and requireAccess gives the illusion of a&amp;nbsp;single named ISAPI DLL which transparently works with similar requirements as ISAPI Extension&amp;nbsp;regardless of Application Pool bitness.&amp;nbsp;Yes, don't forget to set IsapiCgiRestriction on both MyISAPI64.dll and MyISAPI32.dll as well as enable "Execute" permission on your virtual directory... :-)&lt;/P&gt;
&lt;P mce_keep="true"&gt;Cheers.&lt;/P&gt;
&lt;P mce_keep="true"&gt;//David&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9025890" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/david.wang/archive/tags/ISAPI/default.aspx">ISAPI</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/Your+Questions/default.aspx">Your Questions</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/HOWTO_2E002E002E00_/default.aspx">HOWTO...</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Managed Modules and ISAPI Filters</title><link>http://blogs.msdn.com/david.wang/archive/2008/09/08/managed-modules-and-isapi-filters.aspx</link><pubDate>Tue, 09 Sep 2008 07:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8935722</guid><dc:creator>David.Wang</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/david.wang/comments/8935722.aspx</comments><wfw:commentRss>http://blogs.msdn.com/david.wang/commentrss.aspx?PostID=8935722</wfw:commentRss><wfw:comment>http://blogs.msdn.com/david.wang/rsscomments.aspx?PostID=8935722</wfw:comment><description>&lt;H3&gt;Question:&lt;/H3&gt;&lt;SPAN style="COLOR: #008000; FONT-FAMILY: courier new"&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have an isapi filter and a managed module. I need to put both in the same website and I need that the manage module run before the isapi filter. The sequence are: Module---&amp;gt;ISAPI filter. How can I do this? &lt;/P&gt;&lt;/SPAN&gt;
&lt;H3&gt;Answer:&lt;/H3&gt;
&lt;P&gt;The answer really depends on the filter events that the ISAPI Filter subscribes to.&lt;/P&gt;
&lt;P&gt;Unfortunately, no built-in IIS UI or tool displays this information since it is rarely of interest to the user.&lt;/P&gt;
&lt;P&gt;However, you can use my tool from &lt;A class="" href="http://blogs.msdn.com/david.wang/archive/2006/03/02/HOWTO_Add_and_Remove_an_ISAPI_Filter_using_JScript.aspx" target=_blank mce_href="http://blogs.msdn.com/david.wang/archive/2006/03/02/HOWTO_Add_and_Remove_an_ISAPI_Filter_using_JScript.aspx"&gt;here&lt;/A&gt; to view the events that an ISAPI Filter subscribes for. To the astute reader - this filter status&amp;nbsp;information is only available AFTER IIS successfully loads an ISAPI Filter (i.e. IIS successfully LoadLibrary(), GetProcAddress() the Filter DLL's GetFilterVersion() exported function, executes it&amp;nbsp;for registered events, and the function returns TRUE to IIS), and depending on IIS version/mode and the type of ISAPI Filter, IIS ends up loading an ISAPI Filter at different times. The history and rationale behind the differences is an entire blog entry all to itself, but the following table&amp;nbsp;is a sufficient summary for now:&lt;/P&gt;
&lt;TABLE class="" border=1&gt;
&lt;TBODY&gt;
&lt;TR bgColor=#000000&gt;
&lt;TD class=""&gt;&lt;FONT color=#ffffff&gt;IIS Version (Mode)&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;FONT color=#ffffff&gt;Global Filter Loads...&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;FONT color=#ffffff&gt;Site Filter Loads...&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;IIS4 / IIS5 / IIS5.1&lt;/TD&gt;
&lt;TD class=""&gt;On Server Startup&lt;/TD&gt;
&lt;TD class=""&gt;When Configured for a Website&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;IIS6 (IIS5 Compatibility Mode)&lt;/TD&gt;
&lt;TD class=""&gt;On Server Startup&lt;/TD&gt;
&lt;TD class=""&gt;When Configured, on first request to that Website&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;IIS6 (Worker Process Isolation Mode)&lt;/TD&gt;
&lt;TD class=""&gt;On w3wp.exe Startup&lt;/TD&gt;
&lt;TD class=""&gt;When Configured, on first request to that Website&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;IIS7 (Classic and Integrated Modes)&lt;/TD&gt;
&lt;TD class=""&gt;Same as IIS6 Worker Process Isolation&amp;nbsp;Mode&lt;/TD&gt;
&lt;TD class=""&gt;Same as IIS6 Worker Process Isolation Mode&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H4&gt;It's all about Timing&lt;/H4&gt;
&lt;P mce_keep="true"&gt;Now, you may wonder WHY knowing the subscribed filter events affect the answer. As in life and most things in our four dimensional world, it's all about timing, and this situation is no exception.&lt;/P&gt;
&lt;P mce_keep="true"&gt;ISAPI Filter triggers on various events fired by IIS throughout a request's processing, while Managed Modules trigger after only one of those events (and in IIS7 in Integrated Pipeline Mode, Managed Modules trigger on ALMOST all of the events). Thus, if you want the Managed Module to run before the ISAPI Filter, the ISAPI Filter's subscribed events must be limited to those that happen AFTER&amp;nbsp;the Module triggers.&lt;/P&gt;
&lt;P&gt;Since Modules trigger pretty late in the request processing, right before response generation and logging, and ISAPI Filters typically trigger early in the request process, to perform either custom authentication, URL rewriting, etc, it is highly likely that what you want to do is impossible&amp;nbsp;on any IIS version&amp;nbsp;- without knowing the exact filter events involved, I cannot be definitive.&lt;/P&gt;
&lt;P&gt;The following is a condensed outline of how ISAPI Filter and Managed Modules triggering are ordered:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;On IIS4, IIS5, IIS5.1, and IIS6, Managed Modules trigger between the SF_NOTIFY_AUTH_COMPLETE and SF_NOTIFY_SEND_RESPONSE filter events.&lt;/LI&gt;
&lt;LI&gt;On IIS7 in Classic Pipeline Mode, things behave as in IIS6.&lt;/LI&gt;
&lt;LI&gt;On IIS7 in Integrated Pipeline Mode, Managed Modules trigger in-line with all ISAPI Filter events in all Pipeline Modes (Classic and Integrated) because ISAPI Filters are actually just DLLs loaded by the "ISAPI Filter" Module, which acts as a shim to trigger appropriate ISAPI Filter events for the corresponding&amp;nbsp;Module events of the Integrated Pipeline. For example, the "ISAPI Filter Module" subscribes for the OnPreBeginRequest event, which when triggered by IIS will cause it to fire the SF_NOTIFY_PREPROC_HEADERS filter event to all applicable ISAPI Filters for that URL scope.&lt;/LI&gt;&lt;/UL&gt;
&lt;H4&gt;Conclusion&lt;/H4&gt;
&lt;P&gt;In general, if your ISAPI filter does NOT subscribe to events earlier than SF_NOTIFY_SEND_RESPONSE, it would be possible for a Managed Module to execute before the ISAPI filter triggers.&lt;/P&gt;
&lt;P&gt;You should notice some direct correlations between the Module events of the IIS7 Integrated Pipeline and a merging of the ISAPI Filter events and classic ASP.Net HttpModule events. This is intentional - that is what we meant with the name "Integrated" Pipeline! :-)&lt;/P&gt;
&lt;P&gt;The astute reader should note that Managed Modules on IIS7 do not have access to the OnPreBeginRequest module event. Since that event is used by the "ISAPI Filter" Module to trigger the SF_NOTIFY_PREPROC_HEADERS event, this means that even in Integrated Pipeline mode, where Managed Modules trigger in-line with any other module&amp;nbsp;such as&amp;nbsp;the "ISAPI Filter" Module shim, a Managed Module will NOT be able to execute before an ISAPI Filter that subscribes to the SF_NOTIFY_PREPROC_HEADERS event.&lt;/P&gt;
&lt;P&gt;Yes, there is a huge story behind why OnPreBeginRequest even exists and why Managed Modules do not have access to that event (and other such global notification events). The blurbs on MSDN simply does not do it justice...&lt;/P&gt;
&lt;P&gt;But at long last, here is the long-winded response to it all.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;
&lt;P&gt;//David&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8935722" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/david.wang/archive/tags/ISAPI/default.aspx">ISAPI</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/Your+Questions/default.aspx">Your Questions</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>IIS7 Handlers - accessPolicy and requireAccess</title><link>http://blogs.msdn.com/david.wang/archive/2008/06/01/iis7-handlers-accesspolicy-and-requireaccess.aspx</link><pubDate>Sun, 01 Jun 2008 11:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8567407</guid><dc:creator>David.Wang</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/david.wang/comments/8567407.aspx</comments><wfw:commentRss>http://blogs.msdn.com/david.wang/commentrss.aspx?PostID=8567407</wfw:commentRss><wfw:comment>http://blogs.msdn.com/david.wang/rsscomments.aspx?PostID=8567407</wfw:comment><description>&lt;H3&gt;Question:&lt;/H3&gt;&lt;SPAN style="COLOR: #008800; FONT-FAMILY: courier"&gt;
&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;In IIS 7.0, you can edit a handler mapping in the Handler Mappings applet (like for AspClassic), then click Request Restrictions button, Access tab, and select the "Write" permission. &amp;nbsp;But even when the "Edit Feature Permission" in that site/folder is set to Read+Script+Execute, the handler with the "Write" permission is still disabled!&lt;/P&gt;
&lt;P&gt;Why?&lt;/P&gt;
&lt;P&gt;How do you both keep a handler enabled and also set its request restriction to "Write" at the same time? I've read through all the IIS help files, they're either silent or incorrect on this question.&lt;/P&gt;&lt;/SPAN&gt;
&lt;H3&gt;Answer:&lt;/H3&gt;
&lt;P&gt;What you want to do is not achievable via the UI. You have to configure the .config file directly.&lt;/P&gt;
&lt;P&gt;This looks like a bug in the UI because the "accessPolicy" and "requireAccess" attributes are not aligned.&lt;/P&gt;
&lt;P&gt;Here's what the UI is attempting to do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;accessPolicy corresponds to the old "Execute Permissions" set of checkboxes&lt;/LI&gt;
&lt;LI&gt;requireAccess is brand new in IIS7. After we opened up the handler definition in IIS7, it became necessary to add requireAccess so that one could express the concept of "this handler requires script access permissions to execute" so that one could then use accessPolicy to control whether "scripts" can run or not.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Before IIS7, the logical tie between handlers and requireAccess was hardcoded into IIS into statements like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;StaticFileHandler requires Read Permission&lt;/LI&gt;
&lt;LI&gt;All Other Handlers require Script Permission&lt;/LI&gt;
&lt;LI&gt;EXE and DLL require Execute Permission&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Starting from IIS7, it is completely wide open. The astute reader should realize that it is possible in IIS7 to do something goofy like set ISAPI Handler to require "no" permissions (instead of Execute) and allow the ISAPI Handler to be executed by IIS Core all the time. However, the actual execution of an ISAPI DLL by the ISAPI Handler is still subject to ISAPI CGI Restriction. This is another example of defense in depth!&lt;/P&gt;
&lt;P&gt;What the UI tries to display via the "State" view is: "if you allow only scripts, only these handlers are active". Of course, it is missing the "Write" permission as a filter. Even though the handler require access dialog just added "Write". Thus, when you selected "Write" request restriction for the handler, it makes it impossible for the UI to display as enabled because it does not have "Write" permission as a filter.&lt;/P&gt;
&lt;P&gt;I would chalk this up as a bug introduced when WebDAV was added for Windows Server 2008 because that's the main module that needs it. However, if you think about what I just said, this is really easy to work around. Remember, IIS7 does not know what "Execute" permission is (or else the goofy ISAPI Handler configuration would not be possible), so&amp;nbsp;IIS7 does not know what "Write" permission is, either.&lt;/P&gt;
&lt;P&gt;Internally, the handler execution logic in IIS7 Core is:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;accessPolicy contains "Text1, Text2, Text3".&lt;/LI&gt;
&lt;LI&gt;handler's requireAccess contains "Text3".&lt;/LI&gt;
&lt;LI&gt;requireAccess text is found inside of accessPolicy text. Allow handler execution.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;//David&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8567407" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/Your+Questions/default.aspx">Your Questions</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Choice of Development Platform for IIS Modules</title><link>http://blogs.msdn.com/david.wang/archive/2008/04/18/choice-of-development-platform-for-iis-modules.aspx</link><pubDate>Fri, 18 Apr 2008 11:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8407040</guid><dc:creator>David.Wang</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/david.wang/comments/8407040.aspx</comments><wfw:commentRss>http://blogs.msdn.com/david.wang/commentrss.aspx?PostID=8407040</wfw:commentRss><wfw:comment>http://blogs.msdn.com/david.wang/rsscomments.aspx?PostID=8407040</wfw:comment><description>&lt;H3&gt;Question:&lt;/H3&gt;&lt;SPAN style="COLOR: #008000; FONT-FAMILY: courier new"&gt;
&lt;P&gt;I am starting a new project (ASP.NET 3.5) that will require at least one custom HTTP module. My two development computers are running 32-bit XP Pro/SP2, but I plan to reimage with Vista (already have it ready to be installed). My preference would be to NOT switch to Vista quite yet, but continue the project with my XP Pro systems.&lt;/P&gt;
&lt;P&gt;Is it possible or reasonable to proceed with developing the custom HTTP module(s) with my XP Pro system (IIS 5.1) and expect that they will work just fine with IIS7 - and with no changes - when I upgrade to Vista? Or do I really need to switch to Vista before developing these custom HTTP modules?&lt;/P&gt;
&lt;P&gt;One module will implement a custom authentication scheme. Another will load an assembly into a separate app domain, execute some code, marshal the results back, stick them into the ASP.NET application state, and then kill that separate app domain.&lt;/P&gt;&lt;/SPAN&gt;
&lt;H3&gt;Answer:&lt;/H3&gt;
&lt;P&gt;I think the choice of development platform should depend on the features you want to provide and the platforms you plan to support. Personal preference and upgrade schedule should not decide the development platform unless you also want&amp;nbsp;them to decide your potential user/customer base.&lt;/P&gt;
&lt;P&gt;Personally, I believe you should develop on Vista, and here is why.&lt;/P&gt;
&lt;P&gt;First, IIS7 is finally the release where the development experience on the client OS matches the corresponding server OS. No more hassling over XP Pro and Windows Server 2003 differences in everything related to IIS, from security ACLs, security models, Application isolation between high/medium/low and Application Pools, Web Service Restrictions on CGI and ISAPI, configuration changes, TCP Connection limitations, etc... you get the picture. The same IIS7 server core is on Vista and Windows Server 2008, with the same security model, application isolation, configuration files, etc. Unity at last.&lt;/P&gt;
&lt;P&gt;Now, for some more technical reasons. IIS7 has two "Pipeline modes", classic and integrated, that offer completely different behavior/abilities for certain events (authentication being one of them):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Classic mode is supposed to mirror ASP.Net behavior on IIS5x/6.0. With some minor tweaks while reconciling IIS and ASP.Net behavior.&lt;/LI&gt;
&lt;LI&gt;Integrated mode is completely new and represents true managed code extensibility of IIS for the future that mostly matches the native code extensibility of IIS.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I must warn that Classic mode will NEVER match Integrated mode in terms of features and functionality - it exists only for legacy, compatibility reasons. Thus, by definition, the two modes are different.&lt;/P&gt;
&lt;P&gt;So, yes, it should be relatively painless to author a Custom Authentication HttpModule in ASP.Net on IIS 5.1 and run it in Classic mode on IIS7. However, that module will likely fail when you switch to Integrated mode, especially for Authentication since it is one of those events whose ordering changes (intentionally, for the better) between Classic and Integrated mode.&lt;/P&gt;
&lt;P&gt;In fact, the way you configure that module will be different in IIS7 between the&amp;nbsp;two modes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In Integrated mode, your simply add a new &amp;lt;module&amp;gt; using the type of your custom auth assembly in &amp;lt;modules&amp;gt;, and optionally add a preCondition to determine if&amp;nbsp;the module&amp;nbsp;should only run on requests involving managed code (i.e. only .aspx, .asmx, etc pages) or all requests (i.e. .html,&amp;nbsp;.xml, .css, .asp, .php,&amp;nbsp;pages).&lt;BR&gt;&lt;BR&gt;This is exactly what people tried (in vain) to do with ASP.Net 2.0 on IIS6 but could not, and certainly not with the elegance and compactness of preConditions.&lt;BR&gt;&lt;BR&gt;Instead, what one needs to do is the following set of kludges...&lt;/LI&gt;
&lt;LI&gt;In Classic mode, you need configuration that emulates what it took on IIS6 to get similar (but not identical) behavior. This means: 
&lt;OL&gt;
&lt;LI&gt;*-scriptmap to aspnet_isapi.dll -- this is now a *-&amp;lt;handler&amp;gt; to isapi.dll with aspnet_isapi.dll as the scriptProcessor&lt;/LI&gt;
&lt;LI&gt;&amp;lt;httpHandler&amp;gt; for * which derives from DefaultHttpHandler and tweaks some special settings on the HttpContext to cause it to call the HSE_REQ_EXEC_URL ISAPI ServerSupportFunction underneath the covers&lt;/LI&gt;
&lt;LI&gt;Order the remaining &amp;lt;httpHandlers&amp;gt; correctly relative to #2 to get reasonable behavior&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The astute reader will remind you that I just rushed through a WHOLE lot of details there, which many&amp;nbsp;people have dedicated countless number of hours of&amp;nbsp;pain/frustration/anguish&amp;nbsp;and countless fragments of articles describing how to get an ASP.Net 2.0 Custom Authentication Module to [not] work on IIS 6. And what I just described does not even apply or work on the IIS 5.1 on XP Pro 32bit scenario you just described, unless you intend to only implement Custom Authentication module for ASP.Net pages and static files.&lt;/P&gt;
&lt;P&gt;Now, we could have made it easier on the users (but much harder on us) in implementation, but we chose the clean implementation you currently see PRECISELY because it starkly shows how much more elegent Integrated mode is in comparison to classic mode at resolving the issue of managed code extensibility of IIS.&lt;/P&gt;
&lt;P&gt;I hope this helps frame the discussion for your future development&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;//David&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8407040" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/david.wang/archive/tags/IIS7/default.aspx">IIS7</category></item></channel></rss>