简体   繁体   中英

How to force ClickOnce deployment url?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM