Windows Service: wyUpdate ended before the current update step could be completed

I have followed the WindowsService example in the source code, and added a timer which checks for update every 10 minutes to call ForceCheckForUpdate() when UpdateStepOn is UpdateStepOn.Nothing.

Sometimes, the CheckingFailed event is invoked with the error message "wyUpdate ended before the current update step could be completed." Is there some other check I should be doing before calling ForceCheckForUpdate() from my timer to prevent the CheckingFailed event from being raised?

Also I note that in the WindowsService example, there is this comment:// You don't want to recheck for updates on every app start.

Is this comment specific to the example, which is specifically checking every 10 days? Or is this a general rule because doing so may cause issues in general, and if so why?

That comment is there because the AutomaticUpdater automatically checks for updates. Calling ForceCheckForUpdate() at the start of the app is often useless, and sometimes destructive (i.e. an exception will occurs), especially if the UpdateStepOn is not checked first.

As far as the error you're getting, I'm going to need more information. Preferably a way to reproduce the error.

Sam wrote:> That comment is there because the AutomaticUpdater automatically checks for> updates. Calling ForceCheckForUpdate() at the start of the app is often> useless, and sometimes destructive (i.e. an exception will occurs),> especially if the UpdateStepOn is not checked first.

But a windows service does not use the AutomaticUpdater.. it uses the AutomaticUpdaterBackend directly. So is this comment valid in the context of a windows service?

You still have to check UpdateStepOn regardless of whether you're using the AutomaticUpdater or AutomaticUpdaterBackend.

Regarding you sometimes getting an error saying wyUpdate ended prematurely, we'll need a lot more information in order to help you. Preferably a way to reproduce the problem.