问题
When running our installer, we have it configured to setup 3 websites in IIS, before the upgrade this worked as expected, even if the default website (or any site listening on the same port) was still present.
If the website listening to Port 80 was already started, WiX would create the website from our installer, and just not start it (which is what I'd expect). Since upgrade to 3.7, however, what I've found is that the installer does not create the website if there is any other site configured in IIS that's listening to the same port.
Is there something missing in the WiX setup that I need to add to force WiX to add the website from our installer, or is this just a known issue with creating websites via WiX?
Edit:
Looking into this further, it appears that the website is checked by the port, rather than by name. If I have "Default Website" on port 80, any applications that are under the website I have in the installer are configured under the Default Website.
回答1:
The IIS CustomActions in the WiX toolset use the "natural key" to find the web site which is the ip:port:header
combination. Most websites, only the port
is specified. In you scenario, I expect the WiX toolset found the existing website and "fixed it" based on the specifications in your installation package.
回答2:
Thanks Rob, I managed to fix the issue by setting the ConfigureIfExists
flag to true, which created the site as I'd expected it to originally.
来源:https://stackoverflow.com/questions/15203465/wix-3-7-iis-setup