Dynamically changing UpdateLocation at Runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an application to deploy using ClickOnce, but do not have one location
for updates.

I want to dynamically change
ApplicationDeployment.CurrentDeployment.UpdateLocation at runtime.

Problem is that that property is read only!

Many of my clients do not have an internet connection, and i want to allow
them to auto update nonetheless. So i wanted to create two applications. The
first would be an updater, which would have packaged with it a zipped version
of my main app. It would unzip to a directory of the user's choice, and
client machines would install from there. This "server" app could easily be
updated by a sysadmin via CD even with no internet connection. the trick is
to get the client app to update itself from the local server which obviously
would be a different path for each of my clients. I just don't want to have
to pass around the CD to every client machine. I could make my client app
aware of the location via sql server database, but how do i tell Click Once
where to go for updates AT RUNTIME?
 
Hi,

Thanks for your post.

Currently, I am not sure I understand your problem very well.

Normally, ClickOnce deployed winform application will be embeded with some
Deployment API code to refer to the deployment manifest for updating. So it
is the deployment manifest which controls the updating
location(ApplicationDeployment.CurrentDeployment.UpdateLocation property).

However, if your client machine does not have any internet connection, the
deployment API can not get the deployment manifest, so it will not do the
update work.

For your updater application, can we just unzip the newer version of
application files to overlay the original version? I do not think ClickOnce
will understand the local updating location, because the ClickOnce code can
not get the deployment manifest.

Any further detailed description regarding your issue context is welcome.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Ok! Let's simplify my issue. I want to deploy a click once application which
can be downloaded (updated) from more than one location.
For example:
A Primary and secondary (backup) website for redundancy
or
Locally installed from c:\inetpub\wwwroot\...., Online at www.mysite.com/...

All i want is to be able to programtically chose where to update from.

My App IsNetworkDeployed even when installed from a UNC of local path, so
you were incorrect when you said i cannot access the deployment manifest. The
only problem is i cannot CHANGE the deployment manifest.

I found this
http://lab.msdn.microsoft.com/productfeedback/viewbug.aspx?bugid=FDBK33394
and hope that it has been taken care of. It is a simple functionality which
sems to be lacking.
Either that or i am very confused.
 
Hi,

Thanks for your feedback.

Yes, we can not change the updating URL from the deployed application,
however, before deploying, we can supply several backup deploy URL in the
deploy manifest file by using "Updates" button in the "Publish" tab page.
Does this meet your need?

Anyway, our product team has got the requirement for the first scenario.
They may add this feature in later release of ClickOnce.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
It would help meet my needs, BUT
It is simply not true!
Unless you have a different version than i, there is no way to add more than
one update URL in the GUI for winforms.
I could manually edit the manifest files, but that would break the digital
signature, and it wouldn't install.
True, you can specify an update URL different than the deployment location,
but it then will ONLY use the update URL.
 
Hi,

Ok, but this is currently what .Net ClickOnce provides to us, and our
product team has confirmed this. Currently, we do not have good solution
for this issue. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top