user610064
user610064

Reputation: 481

How to make a simple auto-updating client (windows service)?

How to make a simple auto-updating client (windows service)? Note: Am using .NET 2.0 client and .NET 4.0 IIS web server.

I thought that I would have a main startup .exe (Step 1 and 1.5) and a separate class (DLL) to be called after the update process for the rest of the work so the 'worker' DLL could be overwritten in the update procedure.

Is this the best way to make an auto-update client? All steps below are run at every timer interval and at at windows service / program startup.

  1. Close then open web service connection 1.5 Auto update client if web service version is newer in a transaction (download zipped binary file to update the client Program folder - usually just the "worker" dll file.)
  2. Login to web method to get SecurityToken to be used for future web method calls
  3. Upload local MessageLog (ideally before and after all processes)
  4. Get client settings
  5. Do main work processes (worker class)
  6. Upload Local MessageLog
  7. Logout web method
  8. Close web service connection

Other Notes:

a. Client is only upgraded if that installation has a web server setting allowing them to receive updates, and their app version needs an update (compare version #'s).

b. Everything is over SSL.

c. I will secure the entire web service in addition to requiring a security token per web method (security token expires after 60 minutes or less).

d. The client config file is strongly encrypted (login creds to entire web service and for the specific installation)

e. I probably should download a MD5 sum of the app update binary file to ensure I have the correct file to install. Does .NET implement MD5 in a standard way for Windows and on Mono framework for a Mac?

f. This custom program is not freely available on the web but only for some clients.

Upvotes: 0

Views: 1658

Answers (1)

Thorsten Dittmar
Thorsten Dittmar

Reputation: 56697

Is there a problem using ClickOnce? It is built into the .NET Framework and can be configured from Visual Studio.

Upvotes: 2

Related Questions