Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix HttpUrlReservation使用自定义端口失败_Wix_Wix3.10 - Fatal编程技术网

Wix HttpUrlReservation使用自定义端口失败

Wix HttpUrlReservation使用自定义端口失败,wix,wix3.10,Wix,Wix3.10,当使用WiX 3.10.1中的新模块保留端口时,如果我保留在:8080上,它工作正常,但当尝试保留在其他端口(例如:444)上时,它失败。从msiexec.exe运行完整的安装日志,我得到了与此情况相关的以下信息: ExecFirewallExceptions: Installing firewall exception2 xxx on port 444 , protocol 6 ExecFirewallExceptions: Error 0x8000ffff: failed to set

当使用WiX 3.10.1中的新模块保留端口时,如果我保留在:8080上,它工作正常,但当尝试保留在其他端口(例如:444)上时,它失败。从msiexec.exe运行完整的安装日志,我得到了与此情况相关的以下信息:

ExecFirewallExceptions:  Installing firewall exception2 xxx on port 444 , protocol 6
ExecFirewallExceptions:  Error 0x8000ffff: failed to set exception port
ExecFirewallExceptions:  Error 0x8000ffff: failed to create FwRule object
Action 15:49:57: WixRollbackHttpUrlReservationsInstall. Rolling back Windows HTTP Server configuration
Action 15:49:57: WixExecHttpUrlReservationsInstall. Configuring Windows HTTP Server
ExecHttpUrlReservations:  Adding reservation for URL 'http://+:444 /' with SDDL 'D:(A;;0x10000000;;;S-1-1-0)'
ExecHttpUrlReservations:  Error 0x80070057: Failed to add URL reservation: http://+:444 /, ACL: D:(A;;0x10000000;;;S-1-1-0)
ExecHttpUrlReservations:  Error 0x80070057: Failed to add reservation for URL 'http://+:444 /' with SDDL 'D:(A;;0x10000000;;;S-1-1-0)'
CustomAction WixExecHttpUrlReservationsInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 15:49:57: InstallFinalize. Return value 3.
Action 15:49:57: Rollback. Rolling back action:
Rollback: Configuring Windows HTTP Server
Rollback: Rolling back Windows HTTP Server configuration
ExecHttpUrlReservations:  Removing reservation for URL 'http://+:444 /'
ExecHttpUrlReservations:  Error 0x80070057: Failed to remove URL reservation: http://+:444 /
ExecHttpUrlReservations:  Error 0x80070057: Failed to remove reservation for URL 'http://+:444 /'
CustomAction WixRollbackHttpUrlReservationsInstall returned actual error code 1603 but will be translated to success due to continue marking
在我的端口示例中,msi安装程序设置为默认安装到:8080,并且有一个自定义对话框,允许用户提供自定义端口。当他们这样做时,会发生两件事:

  • 我更新app.config文件,并从用户处设置更新的端口信息
  • 我尝试使用wix工具集中的
    UrlReservation
    FirewallException
    工具来完成使应用程序联机所需的工作
  • 这个应用程序托管一个owin自托管网站,如果这有很大区别的话

    我的配置如下,以完成此工作:

      <Component Id="exe_Runtime" Guid="*" Directory="INSTALLFOLDER">
        <File Id="_exe_Runtime" KeyPath="yes" Source="..." />
        <File Id="_exe_Runtime_Config" Source="....config" />
        <util:XmlFile Id="SetConsolePort"
                      File="[#_exe_Runtime_Config]"
                      Action="setValue"
                      Name="value"
                      ElementPath="//configuration/appSettings/add[\[]@key=&quot;drey.configuration.consoleport&quot;[\]]"
                      Value="[CONSOLEPORT]" />
    
        <util:XmlFile Id="SetHordeDirectory"
                      File="[#_exe_Runtime_Config]"
                      Action="setValue"
                      Name="value"
                      ElementPath="//configuration/appSettings/add[\[]@key=&quot;WorkingDirectory&quot;[\]]"
                      Value="[FLDR_APPDATA]" />
    
        <!-- Opens the console port -->
        <http:UrlReservation Url="http://+:[CONSOLEPORT]/" HandleExisting="ignore">
          <http:UrlAce SecurityPrincipal="Everyone" Rights="all" />
        </http:UrlReservation>
    
        <!-- Opens the firewall for incoming connection(s) -->
        <fire:FirewallException Id="_exe_runtime_FWX1" 
                                Name="xxx" 
                                Port="[CONSOLEPORT]" 
                                Protocol="tcp"
                                IgnoreFailure="yes" 
                                Scope="any" 
                                Profile="all" />
    
        <ServiceInstall Id="_exe_runtime_ServiceInstall"
                        Name="S3Client"
                        DisplayName="xxxx"
                        ErrorControl="normal"
                        Start="auto"
                        Type="ownProcess"
                        Vital="yes" />
    
        <ServiceControl Id="_exe_runtime_ServiceControl"
                        Name="S3Client"
                        Start="install"
                        Stop="both"
                        Remove="uninstall"
                        Wait="yes" />
      </Component>
    
    
    
    由于端口中的空间(
    http://+:444/
    )而失败。WiX很难自动修复此问题。

    这很快。去看看我是否可以修剪自定义字段中的空格,除非你对此有建议?