简体   繁体   中英

How to remove WebApplication on uninstall?

I install WCF service to IIS. Installer creates Virtual dir and convert it to web application. Unintallation removes all but Web application name remains under IIS site. How to remove it? There is the code

  <iis:WebVirtualDir Id="VDir"
                            Alias="[WEB_APP_NAME]"
                            Directory="INSTALLDIR"
                            WebSite="TheWebSite" >
           <!--Turn the Virtual Directory into a web application.--> 
          <iis:WebApplication Id="TestWebApplication"
                              Name="[WEB_APP_NAME]"
                              WebAppPool="TheAppPool"/>
      </iis:WebVirtualDir>
              <iis:WebAppPool Id="TheAppPool" Name="[APP_POOL_NAME]"/>  

Also, Web site code is outside of component to prevent removing defaultwebsite:

<iis:WebSite Id='TheWebSite' Description='[WEBSITE_NAME]' Directory='INSTALLDIR'>
    <iis:WebAddress Id="AllUnassigned" IP="*" Port="80"/>
</iis:WebSite>

Please check whether SKIPCONFIGUREIIS property was not set. If not (property was set) application will not be deleted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM