Wix安装程序无法在IIS 10

时间:2018-06-06 20:01:34

标签: iis wix

我们在使用wix创建应用池时遇到问题。此问题仅在服务器2016或iis版本> 10上发生。 这是打开详细日志时出错的错误。 它抱怨未找到路径或尝试访问尚未创建或没有权限的路径。安装程序因回滚而失败。

  "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

这是创建应用程序池的wix xml。相同的安装程序msi适用于Windows 8.根据日志,IISMajorVersion为10。我还运行dsim启用功能IIS-ASPNET45以确保Asp.net已注册。我还检查了注册表。这只是在wix创建应用程序池时。升级或我们手动创建应用程序池时,我们没有问题。

    <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" />

1 个答案:

答案 0 :(得分:1)

我照顾好自己的问题。条件必须是=“10”]]&gt;而不是= 10]]&gt;