cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tgjaikish
Level 2

Virtual directory and uninstallation

Hi,
I have a few webservices to be installed as part of a system. I need the webservices to be under a particular root URL i.e. My webservices 1 and 2 should have the URLs : http://myserver.com/MyProduct/WebServices/Service1/Service1.asmx and http://myserver.com/MyProduct/WebServices/Service2/Service2.asmx.
I am having one installer per webservice. I have created the installer using basic MSI project. In the IIS configuration section, I have created the root virtual directory section viz. MyProduct/WebServices and created the Server1 and Server2 virtual directories underneath that. I have used a textbox to gather the port number of the website on which the product needs to be installed and assigned the same through the relevant property to the Website I created under the IIS configuration. I have developed the installer for both WS1 and WS2 in the same manner.
When I install WS1, it does create the virtual directories as expected under the root http://myserver.com/MyProduct/WebServices. When I install WS2 on top of this, that also gets installed in the same root. Now, I uninstall WS1 to see that my root virtual directories are gone and hence the virtual directories related to WS2 also have disappeared.
Can someone suggest a solution for this.

Best regards,
Jaikish
Labels (1)
0 Kudos
(1) Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

This behavior would happen if the components installing the virtual directories don't have any share counts preventing them from being uninstalled. From Windows Installer's standpoint, virtual directories are unknown and not tracked to determine if a component can be removed.

The simplest way of resolving this behavior would be to install the components to the same location (i.e. the component destination) and include a dummy keyfile in the components in both projects. Assuming the components' shared setting was set to Yes, a share count would be created for the dummy file and should be two when both products are installed.
0 Kudos