[wix-users] IIS configuration issue

Laique Abbas laiqueabbas_is at yahoo.com
Fri Sep 30 04:15:51 PDT 2016


This forum is my last hope. Kindly help me out. IIS settings aren't working for my installer when uninstalling the product . I have made a installer that searches for default web site and then make an app pool and virtual directory. I have saved the app pool and virtual directory values in registry too. Everything is working fine except that when i uninstall it completes the uninstallation and then when i go to the IIS manager, my Default web site have a red cross icon on it and the virtual directory is also listed in it though it should have been deleted. while clicking the Default Web Site it shoes an error as "The application / does not exist". I am pasting some relevant snippets here. Kindly point out that where i am wrong.
<Fragment>
    <iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*">      <iis:WebAddress Id="AllUnassigned" Port="80"/>    </iis:WebSite>
    <DirectoryRef Id="INSTALLFOLDER">      <!-- Configuring app pool -->      <Component Id="WebAppCmp"                 Guid="{79D1CA2C-8D20-4F0B-9AE5-BD6AECBF35E4}"                 KeyPath="yes">         <util:User Id="WebAppPoolUser" CreateUser="no" Name="[WEB_APP_POOL_IDENTITY_NAME]"                          Password="[WEB_APP_POOL_IDENTITY_PWD]" Domain="[WEB_APP_POOL_IDENTITY_DOMAIN]"/>
        <iis:WebAppPool Id="WebAppPool"                        Name="[WEB_APP_NAME]"                        Identity="other"                        User="WebAppPoolUser"                         ManagedRuntimeVersion="v4.0"                        ManagedPipelineMode="integrated"/>
          <iis:WebVirtualDir Id="My.VirtualDir" Alias="[VIRTUAL_DIR_VAL]" Directory="INSTALLFOLDER" WebSite="DefaultWebSite">
          <iis:WebDirProperties Id="VirtDirProperties"                                AnonymousAccess="yes"                                BasicAuthentication="no"                                WindowsAuthentication="yes" />
          <iis:WebApplication Id="Application" Name="[VIRTUAL_DIR_VAL]" WebAppPool="WebAppPool"/>
        </iis:WebVirtualDir>        </Component>    </DirectoryRef>  </Fragment>

Above is the code placed in IISConfiguration file.Below i added the component in a feature.
    <Feature Id="IISWebsite" Title="IIS Website" Description="The IIS website and application pool" Level="1">      <ComponentRef Id="WebAppCmp" />    </Feature>
While it works great when i put the below lines inside the mentioned component in IISConfiguration file. But by this it deletes the Default website too which I dont want too. Hide original message
    <iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*">      <iis:WebAddress Id="AllUnassigned" Port="80"/>    </iis:WebSite>
Regards,Laique


More information about the wix-users mailing list