如何强制 ClickOnce 部署 url?
我在这里有点揪心。
我正在将 VS 2008 应用程序发布到服务器,并通过 ClickOnce 安装。到目前为止,一切都很好。它安装得很好。然后我添加了一个 ClickOnce 更新检查器 - 使用 ApplicationDeployment 来处理 & 的检查。应用更新。
到目前为止,一切都很好。
然后,在安装了该更新的某些计算机上,更新程序将无法工作。它返回的错误是该应用程序已从另一个 URI 安装 - 但事实并非如此。
经过足够的挖掘后,我发现:
URL 1: htfp://www.domain.com/app/myapp.application
URL 2: htfp://www.domain.dom/App/myapp.application
ClickOnce 考虑 URL 1 和2 完全不同 - 尽管“app”在 URL 2 中包含大写 A,并且两者都指向相同的有效 .application 文件。
当我发现这一点时,我编辑了所有 Intranet 链接以指向该 URL 的全小写版本,该版本目前有效,但总有可能有人从“不正确”的 URL 安装它 - 唯一的解决方案是从正确的 URL 强制卸载并重新安装应用程序。
如何强制部署 URL ClickOnce 检查更新?它似乎是根据安装的 URL 生成清单的,所以我不确定是否可以从 VS 端修复它。
谢谢
〜沃根
I'm having a bit of a hair-puller here.
I'm publishing a VS 2008 application to a server, to be installed via ClickOnce. So far, so good. It installs just fine. Then I added in a ClickOnce update checker - one that uses ApplicationDeployment to handle checking for & applying updates.
So far, so good.
Then, on some of the machines it was installed on, the updater wouldn't work. The error it returned was that the application had already been installed from another URI - which it wasn't.
After enough digging around, I found that:
URL 1: htfp://www.domain.com/app/myapp.application
URL 2: htfp://www.domain.dom/App/myapp.application
ClickOnce considers URLs 1 and 2 to be entirely different - even though "app" contains a capital A in URL 2, and both point to the same, valid .application file.
When I found that out I edited all our intranet links to point to an all-lowercase version of the URL, which is working for now, but there's always the chance that someone might install it from an "incorrect" URL - the only solution being to forcibly uninstall and reinstall the application from the correct URL.
How do I force the deployment URL ClickOnce checks against for updates? It seems to generate its manifest based on the URL it was installed from, so I'm not sure I can fix it from VS' end.
Thanks,
~ Wogan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
http://msdn.microsoft.com/en-我们/库/16z3sw0x%28VS.80%29.aspx
Try this:
http://msdn.microsoft.com/en-us/library/16z3sw0x%28VS.80%29.aspx