3
votes

The application (.NET C#) I'm working on is being deployed at our customer's own servers, on their IIS, so we can use ClickOnce to install the application on the customers work computers. Since it's the customer's own servers the IPs are never the same. This is a problem for standard ClickOnce update mechanism. Here's the scenario I'd like to end up with:

  • Remove the "The application should check for updates" from the project.
  • After start-up the application fetches application settings from the server (this is already implemented) and in those settings the update URL is provided.
  • Using the update URL the application uses ClickOnce to check for an update.
  • The application is updated and restarted.

Is this possible? And how?

I've read How to move a ClickOnce deployment package and this might work, but sometimes the customer decides to change the server IP.

2

2 Answers

7
votes

You can publish the ClickOnce app and let them put it on their servers (same folder structure) and the user can install it from wherever it is, without having it be a specific URL. To do this, open the project properties, go to the Publish tab, then bring up the Options dialog.

On that dialog, go to the Manifests tab and check "Exclude deployment provider URL".

When the user installs it, ClickOnce will set the deployment provider URL to the installation location, and will look for updates at that location from thereon out.

If your customer then wants to move the deployment to another URL, they have to have everybody uninstall it and reinstall it. Or they can try using this method to move it, but to move it, they have to set the new URL in the deployment manifest and have the box unchecked on the version they're moving it from.

0
votes

In the project properties publish tab click op the Updates button. There deselect 'The application should check for updates' option. (bullet 1).

The rest of the bullets check this blog http://bloggingabout.net/blogs/dennis/archive/2007/11/05/manual-check-for-updates-with-clickonce.aspx