Open ClickOnce application deployed in shared folder by a web browser

 ̄綄美尐妖づ 提交于 2019-12-11 19:59:38

问题


I publish ClickOnce application on a shared folder with UNC //Server/Folder. I use visual studio 2010 and publish this application by the ClickOnce publish wizard.

After publish, I want to run it on my web browser (for example, FireFox and Internet Explorer). I use the address //Server/Folder. Now, I click on the setup file. It will be downloaded to my computer to C:/Users/duytn/Downloads/. Then, I click on this setup to run. An error occur. This is its detail:

SOURCES

Deployment URL: file:///C:/Users/duytn/Downloads/WMEditor.application

ERROR SUMMARY

Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\duytn\Downloads\WMEditor.application resulted in exception. Following failure messages were detected:
    + Downloading file:///C:/Users/duytn/Downloads/WMEditor.application did not succeed.
    + Could not find file 'C:\Users\duytn\Downloads\WMEditor.application'.
    + Could not find file 'C:\Users\duytn\Downloads\WMEditor.application'.
    + Could not find file 'C:\Users\duytn\Downloads\WMEditor.application'.

I think this setup can not find its manifest (*.Application file). I want to publish the project on a shared folder. And run it by web browser.


回答1:


I don't really understand "now I want to run it from my web server". Do you mean you want to move it from the file share to the webserver?

The installation URL of a ClickOnce deployment is part of the identity of the deployment. You can't just change it without handling the change (more on that in a minute). And you can't just move hte deployment and expect it to work. ClickOnce is going to look at that installation URL for the files, no matter where you put them.

If you want to move your deployment from the file share to a webserver, you can do that, but you need to leave the old one in place in order to re-point to the new one, and you need to set the installation and Update URLs correctly. Here's a blog entry showing you how to do that.

Note that in Visual Studio, you can use any publishing file location you want to, but the installation URL must be the same as the location from where the users are installing it. So you can publish it to a local folder or to a file share and copy it to the webserver, but you have to get the folder structure the same, and the installation URL has to point to the webserver.




回答2:


You should run the setup from the shared folder, as the setup.exe looks for the deployment file on the same folder the setup.exe resides in.

Use file://server/sharefolder/setup.exe as the link in your web browser and click "run".



来源:https://stackoverflow.com/questions/6568304/open-clickonce-application-deployed-in-shared-folder-by-a-web-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!