Behaviour with multple download sites

Hi Guys,

we are checking out your excellent software.Seems well written and easy to understand for me.Nice work.

But now for the question :

I have defined multiple download sites.Site 1 is only reachable on our internal network.Site 2 is reachable on the Internet.Order is : site 1 and then site 2

The program is i'm trying to update is a windows service written in VB.NET.I'm using the latest AutoUpdate component (downloaded yesterday).With 1 download site everything works well.But with the 2 sites I get the following behavior :

When I stop the website at site 1 to check if WyUpdate uses site 2 and then do a check for update from the service :

I get the DownloadingFailed event with the errormessage :

Error trying to save file: Error downloading "http://dev-srv-ins/Publish/InsunetBackend/insunetbackend.1.0.to.1.1.wyu": Unable to connect to the remote server

(dev-srv-ins is our internal testserver)

After that all updates are blocked, until I restart the service.

My question is :

Why do I get this error ?Why are all updates blocked, even if I restart the website on DEV-SRV-INS ?

Problem 1 is solved 😀

I added download site 2, but forgot to update wyserver.wys on the webserver.So the wyserver.wys indicated that updates were to be fetched from site 1 (dev-srv-ins) which was not available at that moment.

So only problem 2 stands :

Why does the above problem prevent the service from receiving any further updates ?Only a restart of the service helps.

Why do I get this error ?

The default behavior of wyUpdate is to try the first download site, and if it fails go to the next download site. If both download sites fail then it will show an error message. Note: it won't show an error message that explains every site and every proxy it tried, it will just show an error with the last site it tried.

Why are all updates blocked, even if I restart the website on DEV-SRV-INS ?

Updates aren't "blocked" -- the AutomaticUpdater is waiting for you to tell it what to do. This means you need to handle all the events and take the appropriate action.

For instance, you don't what the AutomaticUpdater to continually retry on the failed download site ad infinitum because it could kill your servers. Instead you should write a simple method to wait N minutes or X hours before retrying the update.

At the start of my service :

_autoupdater = New AutomaticUpdaterBackend With {.GUID = "8F8CD4AA-9993-4066-8E25-5DB1DDD6AE14", .UpdateType = UpdateType.Automatic, .ServiceName = servicename}

_autoupdater.Initialize() _autoupdater.AppLoaded()

If _autoupdater.ClosingForInstall Then Exit Sub End If

After the initialisation of the service :

_autoupdater.ForceCheckForUpdate()

And then I start a Timers.Timer on a 60 second (for testing) interval.

I get the ProgressChanged eventI get the BeforeDownloading eventI get the DownloadingFailed event with the error I mentionedNothing else.

When the 60 second interval is over, I call the ForceCheckForUpdate method again.But I get nothing. No events whatever.And this goes on every 60 seconds without ever getting any more events or information.Even when site 1 gets back online.

You need to check the UpdateStepOn property to know which update step you're on, and thus what function to call. If UpdateStepOn is Nothing, then (and only then) will ForceCheckForUpdate() work. Otherwise you'll need to use the Install() function.

The install function ?

Is this a function of the autoupdater object ?Or do you mean the InstallNow function ?

RIght, sorry, InstallNow().

Indeed, this solves the problem 😀 Maybe something to mention in your "AutomaticUpdater tutorial for Windows Services and Console Apps" section (http://wyday.com/wybuild/help/automatic-updates/windows-services-console-apps.php)

Thanks for the swift help.