Search code examples
asp.netasp.net-mvc-3iiswixsiteminder

WIX Installer deletes Siteminder virtual directory from root folder


My web application is in MVC3 and I am using WIX 3.5 to deploy it on DEV, QA and PROD boxes. The Application uses Siteminder authentication. The WIX installer installs the application fine and the website works. However, while uninstalling the application, WIX is deleting the Siteminder Virtual directory from the root folder.Here is what the IIS looks like,

enter image description here

enter image description here

This is the way siteminder is setup on the web server (shown below),

enter image description here

The web.config in the image above has all the Siteminder related configuration settings. My application web.config has no siteminder related entries. In other words the Siteminder is transparent to my app. When WIX installs the application it installs everything under folder that I have blacked out in the above image. While un-installing it deletes the app folder(one that is blacked out in the image above) and leaves the 'asp_client' folder and siteminder 'web.config' intact. The folder looks like this after Uninstalling,

enter image description here

In IIS the website virtual directory is deleted, in the image below the folders inside the bule box are deleted completely,

enter image description here

After Installing the application again, WIX installs the app fine but the Siteminder virtual directory is no where to be found,

enter image description here

Please help me figure out a way so that WIX does not delete the Siteminder virtual folder from IIS.


Solution

  • It seems like the Siteminder virtual directory is removed by the WIX uninstaller. As per your questions the Siteminder settings reside inside the Website (as shown in IIS). This will happen when the <iis:WebSite> element is inside <Component> element. Anything inside <Component> is owned by WIX when uninstalling it it will remove the elements under <Component>.

    you have not shared your xml code of WIX but I think your <iis:WebSite> element should look like this,

    <iis:WebSite Id='DefaultWebSite' Description='Your-App-Name'>
      <iis:WebAddress Id='AllUnassigned' Port='8080' />
    </iis:WebSite>
    

    and NOT like this,

    <Component Id="Your-Component-Ref-Id">
      <CreateFolder />
      <iis:WebSite Id='DefaultWebSite' Description='Your-App-Name'>
        <iis:WebAddress Id='AllUnassigned' Port='8080' />
      </iis:WebSite>
    </Component>
    

    when you do this WIX will not create the Website for you, it will just copy the files and setting under the WebSite that already exists in IIS (along with the Siteminder virtual directory)

    Hope it helps.