views:

65

answers:

1

Hi,

I am writing a installer using WiX that will create a website and virtual directory, amongst other things, in IIS. I have been having trouble ensuring that the installer will work on both Windows Server 2003 with IIS6, Windows Server 2008 with IIS7 and Windows Server 2008 R2 with IIS7.5.

One of the first problems that I came across was that IIS7 uses a different group for accounts. Instead of the IIS_WPG of IIS6 it will use the IIS_IUSR group. The website configuration used to belong in a separate custom action function that referenced this group name, the move to using the WiX IIS functionality may help with other minor differences between IIS versions.

Are there any other major changes to IIS that I should be aware of? Are there any guidelines for writing installers to function on both Windows Server 2003 and Windows Server 2008 platforms?

Thanks

+1  A: 

If you are using WiX 3.0, you should be aware that you have to turn "IIS 6 compatibility mode" ON in IIS 7.X for the standard WiX IIS extension to work. WiX v3.5 contains native support for IIS 7, but it is not stable yet - WiX 3.5 is beta itself. You can read more about WiX version plans and feature sets on Rob's blog.

I personally have to support all versions of IIS starting from 5.1 (WinXP) in my product. I ended up using the standard WiX IIS extension and require "IIS 6 compatibility mode" as a prerequisite. Besides, I have a separate WebSite element for each of IIS versions.

For instance, WebSite element has WebApplication attribute, where you reference the WebApplication element. This element in its turn has Isolation attribute, which makes sense for IIS 5.X, and WebAppPool attribute, which is meaningful for IIS 6+. Hence, I have a couple of WebApplication elements I reference either from WebSite for IIS 5, or from WebSite for IIS 6+.

Hope you got the idea and it can help you.

Yan Sklyarenko
Hi Yan, thanks for your input. When you enable "IIS6 compatibility mode", does that enable it for the whole of IIS, or just that application? I don't want to limit other developers from not being able to use the new functionality in IIS7. I recall there being an IIS5 isolation mode for IIS6, is this something similar?
fletcher
Yan Sklyarenko