ClickOnce 部署中报错的解决方式

  

最近公司要是哟该Visual studio的ClickOnce部署windows应用程序给客户挑刺,结果姐遇到了问题,最后终于解决。分享如下:

(具体部署方式就不介绍了,网上一搜一大把)

具体问题:

部分XP电脑在点击安装时候报错:

 Application download did not succeed .Check your network connecton,or contact your system administrator or network service provider.

部分浏览器显示中文: 部分应用程序下载未成功。请检查网络连接,或与系统管理员或网络服务提供商联系。

这问题真确实让我今天伤透了脑筋,

官方提供的的答案是:ClickOnce 无法建立到服务器的网络连接。请检查服务器的可用性和网络的状态。

晕,我都能打开服务器网站还需要检查什么网络连接呢?

部分老外的网站也关注了,也就是些 

 a) Give the user the link to the .application file instead of to the setup.exe and see if that helps at all (probably not).

b) Turn off the user's firewall and try it again. If this works, you need to figure out how to get through the firewall.

 c) Are you protecting the ClickOnce deployment files on the server by giving specific users access to it? If so, this guy doesn't have it.

d) Create another user account on the same machine and try installing the application. Does it work? Then it's something funky about this guy's profile.

都试过了,没效果。

最后我重新做了个最简单的发布程序,发现在这部分XP机器上好用,经过一系列的排除查找终于发现,原来是在配置-》发布-》更新里设置了更新位置(如果与发布位置不同),即使填入了与发布相同的路径也不不行。

如下图:



ClickOnce 部署中报错的解决方式_第1张图片



删除更新位置里内容即可,希望遇到相同问题的朋友们路过此地时能为你化解此惑。

另外,如果发现更新位置并没有填写,同样还要报此错误,那检查截图上的安装URI(如果与上面不同)是否填写,并且填写成网站的形式,http://10.63.10.123 ,有端口号就加,没有就默认服务器地址。不然部分XP机子过老,无法识别路径。

 

网上此答案仅此一家,哈哈!有问题欢迎探讨。



你可能感兴趣的:(ClickOnce 部署中报错的解决方式)