代码之家  ›  专栏  ›  技术社区  ›  Luke

什么原因导致ClickOnce URLDownloadToCacheFile在安装过程中失败?

  •  4
  • Luke  · 技术社区  · 15 年前

    我在通过firefox安装ClickOnce应用程序时遇到以下错误。IE在同一台计算机上不会发生这种情况。我发誓我以前通过火狐安装过。这是一台Windows7机器。

    The following properties have been set:
    Property: [AdminUser] = true {boolean}
    Property: [ProcessorArchitecture] = Intel {string}
    Property: [VersionNT] = 6.1.0 {version}
    Running checks for package '.NET Framework 2.0 (x86)', phase BuildList
    Running external check with command 'C:\Users\luke\AppData\Local\Temp\VSDEF1A.tmp\DotNetFX\dotnetchk.exe' and parameters ''
    Process exited with code 1
    Setting value '1 {int}' for property 'DotNetInstalled'
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet Explorer'
    Read string value '8.0.7600.16385'
    Setting value '8.0.7600.16385 {string}' for property 'IEVersion'
    The following properties have been set for package '.NET Framework 2.0 (x86)':
    Property: [DotNetInstalled] = 1 {int}
    Property: [IEVersion] = 8.0.7600.16385 {string}
    Running checks for command 'DotNetFX\instmsia.exe'
    Result of running operator 'ValueExists' on property 'VersionNT': true
    Result of checks for command 'DotNetFX\instmsia.exe' is 'Bypass'
    Running checks for command 'DotNetFX\WindowsInstaller-KB893803-v2-x86.exe'
    Result of running operator 'ValueExists' on property 'Version9x': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.0.3': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.0': true
    Result of checks for command 'DotNetFX\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
    Running checks for command 'DotNetFX\dotnetfx.exe'
    Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled' and value '0': true
    Result of checks for command 'DotNetFX\dotnetfx.exe' is 'Bypass'
    '.NET Framework 2.0 (x86)' RunCheck result: No Install Needed
    Launching Application.
    URLDownloadToCacheFile failed with HRESULT '-2146697211'
    Error: An error occurred trying to download 'http://croppy.lukehunter.net/download/croppy.application'.
    

    下面是微软的howto,但这不适用于firefox。也没有重定向发生。

    如果用户设置了Internet Explorer 高级安全选项“警告 在安全和不安全之间切换 部署目标上的“模式” 如果 安装ClickOnce应用程序 从非安全重定向到 安全站点(反之亦然) 安装将失败,因为 它。

    6 回复  |  直到 15 年前
        1
  •  4
  •   freegoods    13 年前

    Internet Explorer 打电话 启动应用程序 购物应用程序 火狐 插件(以及visualstudio2008-2010创建的标准引导程序,也可能产生这种罕见的错误)使用另一种过时的技术来启动ClickOnce应用程序。(请注意 启动应用程序 至少需要.NET Framework 2 SP 2。)

    为了避免这种错误,可以重定向 Internet Explorer 购物应用程序 .

        2
  •  0
  •   Luke    15 年前

    嗯,用IE安装,然后卸载后,我又可以通过firefox安装了。奇怪。

        3
  •  0
  •   Uwe Keim    12 年前

    以下几点对我有用:

    在本地分发包中单击一次web.config文件文件是在clientCache上生成的,这就是问题所在,在CHROME和IE8中进行了如下修改,现在运行该文件:

    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
    
        4
  •  0
  •   Dave    11 年前

    我有过这样的情况,解决这个问题的方法是关闭防火墙。很遗憾,我不知道它是什么防火墙设置,我只是禁用了很多,它运行/安装没有问题。

        5
  •  0
  •   B.M.    8 年前

    在对这个问题用尽了防火墙选项之后,我发现excutable指向的是应用服务器的IP地址。当我将站点部署更改为服务器的FQDN而不是IP地址时,安装程序第一次工作了。

        6
  •  -1
  •   José Donoso    7 年前

    简单的解决方案,在命令执行安装程序.exe/URL=http://<生产URL>/