Wix installer fails to create application pools in IIS 10

1

We are having trouble creating our app pools using wix. This problem happens only on server 2016 or iis version >10. This is the error with verbose log turned on. Its complaining about path not found or trying to access a path that has not been created or does not have permissions. The installer fails with rollback.

  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -norestart -s W3SVC/1/ROOT/INFO-SUITE
CAQuietExec:  Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
CAQuietExec:  Administration utility to install and uninstall ASP.NET on the local machine.
CAQuietExec:  Copyright (C) Microsoft Corporation.  All rights reserved.
CAQuietExec:  Start registering ASP.NET (4.0.30319.0) recursively at W3SVC/1/ROOT/MyApplication.
CAQuietExec:  Installation stopped because the specified path (W3SVC/1/ROOT/MyApplication) is invalid.
CAQuietExec:  Error 0x80070001: Command line returned an error.
CAQuietExec:  Error 0x80070001: CAQuietExec Failed

This is the wix xml which creates the app pool.The same installer msi works on windows 8. The IISMajorVersion is 10 according to the log. I also ran dsim enable feature IIS-ASPNET45 to make sure Asp.net is registered. I also checked the registry. THis is only when the wix creates the app pools. We don't have a problem when its an upgrade or we manaully create the app pools.

    <Fragment>
        <PropertyRef Id="IISMAJORVERSION" />

        <Component Id="Component.WebServer.WebServices.IISSite.v10" Guid="F73DACBB-EF8B-4C8E-8B6A-6610670D991F" Directory="WEBSERVICES_INSTALLLOCATION">
          <Condition><![CDATA[IISMAJORVERSION >= 10]]> </Condition>

          <CreateFolder />

          <iis:WebAppPool Id="WebAppPool.WebServices.IISSite.v10"
                          Name="[WEBSERVICESSERVERINFO_IISAPPNAME]" 
                          ManagedRuntimeVersion="v4.0" 
                          ManagedPipelineMode="integrated"
                          Identity="networkService"
                          IdleTimeout="0" />


          <iis:WebVirtualDir Id="WebVirtualDir.WebServices.IISSite.v10"
                             Directory="WEBSERVICES_INSTALLLOCATION"
                             Alias="[WEBSERVICESSERVERINFO_IISAPPNAME]" 
                             WebSite="WebSite">
            <iis:WebDirProperties Id="WebDirProperties.WebServices.IISSite.v10"
                                  Execute="yes"
                                  Script="yes"
                                  Read="yes"
                                  WindowsAuthentication="yes"
                                  AnonymousAccess="yes"
                                  IIsControlledPassword="yes" />

            <iis:WebApplication Id="WebApplication.WebServices.IISSite.v10"
                                Name="[WEBSERVICESSERVERINFO_IISAPPNAME]"
                                WebAppPool="WebAppPool.WebServices.IISSite.v10" />
          </iis:WebVirtualDir>
        </Component>
      </Fragment>

   <ComponentGroupRef Id="ComponentGroup.WebServer.WebServices.Files" />
        <ComponentRef Id="Component.WebServer.WebServices.SetWebConfig" />
        <ComponentRef Id="Component.WebServer.WebServices.Certificates" />
        <ComponentRef Id="Component.WebServer.WebServices.IISSite.v10" />
iis
wix
asked on Stack Overflow Jun 6, 2018 by user575219 • edited Jun 6, 2018 by user575219

1 Answer

1

I took care of my own problem. The condition had to be = "10"]]> instead of = 10]]>

answered on Stack Overflow Jun 6, 2018 by user575219

User contributions licensed under CC BY-SA 3.0