[Webinar] Streamline your web hosting managementRegister Today


Solution for Installing and the updating an application similar to how ClickOnce Works

Posted on 2012-04-02
Medium Priority
Last Modified: 2012-04-08
I'm building a client/server application. I'm looking for a solution to distribute both the client and server applications. Whatever I end up doing must include an update service along the same lines as ClickOnce updates.

Basically I have 45-50 sites where the server application will be installed and there will be fairly frequent updates to both the server and client side applications. I'm happy enough using clickonce for the client side application. In fact that makes perfect sense as many of the users won't have admin rights.

But ClickOnce will not be suitable for the server side application as it will need to be installed into a specified folder on a server and the installer will need admin rights.

Is there anything out there that provides ClickOnce type update/installation functionality but with MSI like installation? The ability to do Automatic updating from a folder on a website would be ideal.

I have access to all the latest MS development products.
I'm currently using VS 2010 but would consider VS 11 if there is something worth looking at.
Happy enough to pay for a product as long as it's not unreasonably expensive.
Would consider code based solution if one exists.
Question by:shanejh
  • 2
  • 2
LVL 53

Accepted Solution

Dhaest earned 1000 total points
ID: 37799420
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 1000 total points
ID: 37801862
Since .NET components do not need to be registered, after the initial installation, many applications require only a file copy to be updated.

It depends on the structure of the application, and whether it is entirely .NET or not, but before ClickOnce, I used a very simple update system for one of my customers that is still working after many years in production. I have known of a few programmers who also used a similar system. This scenario is easier to work with if you design your application so that all the required dlls are installed in the same directory as the application.

The application was not started as such. The user never knew, but when they thought they were starting the application, they were starting an updater. We had with the application a simple text file that contained only the version number. The updater compared that file in the installation directory with the same one on the distribution server and could thus detect that a new version was available. If not, it simply launched the application. Otherwise it simply ran a simple application on the server that made a copy of all the files that needed to be changed.

I understand that you want something that works with a server that might be running full time, so you could not check at launch because you might not launch the server often. You could have a timer running in the background that would make the comparison between both files at regular intervals and detects that a new version is available. It would then trigger an update.

The way to update a server can be different depending on the way the server application is used and accessed.

If the server is called only for short operations, you could simply turn it off, update and turn it back on. The client application could detect that the server is updating and send a waiting message to the user. Unless your server application is huge, copying a few files should not take that long.

If the server cannot be shut down while in use, you would need something else. Applications would connect to the server through some mechanism that would give them the current location of the server. You would work with 2 directories, one for the current server and one for the new updated version. Applications that are already connected could continue working on the current server while you are copying the updated one into the adjacent directory. Once the application is updated, you adjust the connection mechanism so that it points to the new location. Applications already running will still use the old server until they are shut down, but will be redirected to the new one when relaunched.

If you often release a simultaneous update of both the server and the client, then you have to make sure that the servers are updated before the client. Just make sure that the timer you used to trigger the server update is set to a short interval, and always update the distribution server with the server application updates a few minutes before you do so with the client application.

Naturally, there could be many variations of these scenarios. But due to the fact that .NET applications and dlls do not need to be registered to work together, it is quite easy to implement your personal version of ClickOnce.

There is also a System.Configuration.Install.Installer class in the framework that you might want to explore.

Assisted Solution

shanejh earned 0 total points
ID: 37803718
Thanks for the responses. Definitely helpful.

They have made me realize that I just needed to be looking for the right thing, Auto Update Frameworks.

I have found the following:

I like the look of wyUpdate at this stage. It seems like managing updates would be fairly easy with it and although you need to pay for it the source code is available as it is open source. They provide some nice code examples too.

Are there any other update frameworks out there? Again I don't care to pay for a good solution.
LVL 53

Expert Comment

ID: 37804484
You can close the question by yourself

Author Closing Comment

ID: 37820935
All comments lead to my final solution. Depending on what you are after all the information above is relevant.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question