Applicating Updater Block

After 2 years of just giving up on updating my .net apps through the web server, I finally went to patterns and practices guru, Chris Kinsman who helped me figure out how to combine a feature from the AppUpdater component (that is unavailable in the Application Block) with a feature from the Application Block (that is unavailable in the component).

Basically I wanted to be able to update on demand, before my application loads and then not do any updating after that while the application is running. In addition, I wanted my updater to be able to discover dll’s that it would not be able to identify through reflection within the execution path. These dll’s are randomly added to the application and are loaded dynamically.

So – Chris worked out that part of it, whipped up some code for me, and I have been working out the problem of incorporating this into my application so that I can go through this process:

1) user starts up the app by way of the stub application (the appupdater program)

2) user logs in using WSE2 for authentication and authorizaton 🙂

3) upon being properly authorized, the app updater component does it’s job, checking for updates and downloading them. If the user is unrecognized, it just fails. If the authorization returns some “interesting“ information about the user, something “interesting“ will happen to the application on the client machine.

4) the app udater then fires up the latest version of the program I want to run

Sounds simple – and in hindsight it will be, but it has been a bear! At some point, I will dig in to Chris’ code to see what magic he worked to make the app block deal with my needs, but for now I am just happy that I have the update working!

Most of my difficulties with implementing the solution he sent revolved around the fact that the basic setup for the application block is dependent on local host. So I had some setup and configuration problems and then had to understand how to use the manifest utility to create and ecrtypted manifest that actually uses digital signing to verify the downloads to the client.

It is completely senseless to remain stuck on a problem and be so bull-headed to think that additional instances of whacking your skull on a brick wall is going to somehow solve the problem. There are some incredible resources available in our community to sub-contract even for little pieces of expertise. Chris has proven to be one of those people I know I can turn to help me solve some problems that I just don’t have the skill or knowlege for.

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.