开发者

Open ClickOnce application deployed in shared folder by a web browser

开发者 https://www.devze.com 2023-03-17 15:04 出处:网络
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.

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.


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.


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".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号