|MSDN Home > MSDN Library > .NET Development > Building Distributed Applications with .NET > Implementations >|
Updater Application Block Overview
By Edward Jezierski (Microsoft Corporation), Michael Stuart (Microsoft Corporation), Graeme Malcolm (Content Master Ltd), and Diego Gonzales (Lagash Systems)
Summary: In medium to large organizations, it is common to want to keep all instances of a desktop application up to date with the latest version of executable files, library files, and other files. Ideally, administrators and support engineers like to deploy the updated files only once, to a central server, and have the updated files automatically replicate to each desktop installation. The Updater Application Block is a .NET solution that provides a "pull model" solution to automatically download application updates from a central location. It is designed for organizations who want the rich functionality of Windows Forms applications with the centralized manageability of Web-based applications, and who do not have the infrastructural requirements for "push model" solutions such as Microsoft Systems Management Server (SMS). By using the Updater Application Block to download application updates, you can overcome the security "sandbox" limitations of downloading Windows Forms applications through a browser, while still maintaining control and security over the application update process. (9 printed pages)
Do you need to deploy updates to .NET applications across multiple desktops? Would you like to develop "self-updating" applications? If so, the Updater Application Block for .NET is for you.
The Updater Application Block is a .NET component that you can use to detect, validate, and download application updates deployed in a central location. By using the Updater Application Block, you can keep desktop applications up to date with little or no user intervention. You can also extend the Updater Application Block to use custom classes for downloading and validating files, performing post-deployment configuration tasks, and controlling the update process.
Specifically, the Updater Application Block helps you:
The remainder of this overview is divided into the following sections:
The source code for the Updater Application Block is provided, together with QuickStart sample applications, which you can use to test its functionality. The Updater Application Block also includes comprehensive documentation to help you work with and learn about the code provided.
The Visual Studio .NET Projects
Microsoft Visual Basic .NET and Microsoft Visual C# .NET source code is supplied for the Updater Application Block, together with QuickStart Sample applications in each language that you can use to test common scenarios. This helps increase your understanding of how the Updater Application Block works. You are also free to customize the source code to suit individual requirements.
Both the Visual Basic .NET and C# version of the Microsoft.ApplicationBlocks.ApplicationUpdater projects can be compiled to produce two assemblies named Microsoft.ApplicationBlocks.ApplicationUpdater.dll and Microsoft.ApplicationBlocks.ApplicationUpdater.Interfaces.dll. These assemblies contain all the classes and interfaces that comprise the block.
The download also contains the following QuickStart projects:
Comprehensive documentation is provided. This includes the following main sections:
To run the Updater Application Block, you need the following:
A Windows Installer file containing the Updater Application Block projects, source code and comprehensive documentation is available. The install process creates a Microsoft Application Blocks for .NET submenu on your Programs menu.
On the Microsoft Application Blocks for .NET submenu, there is an Updater submenu that includes options to launch the documentation, to install the QuickStart demonstration applications, and to open the Updater Application Block Visual Studio .NET solutions.
After you install the Updater Application Block, you should install the QuickStart applications using the Install Quickstarts option on the Updater submenu. This compiles the QuickStart solutions, creates the required Web folders and network shares, and generates the appropriate manifest files required by the QuickStart samples. You can remove the QuickStarts from your computer using the Uninstall Quickstarts option on the Updater submenu. To learn more the install script, see the Readme.txt file in the application installation folder or click ReadMe on the Updater Start menu.
Click here to open the MS.com download page.
This section discusses how to use the basic features of the Updater Application Block. Additional information about these and other related topics can be found in the documentation included in the Updater Application Block download.
To use the Updater Application Block, you must prepare a central location on a server from which application updates can be downloaded. This server location must include an XML manifest file for each available application update as well as the updated files themselves.
You must also prepare each client computer that will download updates by installing the Updater Application Block and configuring it to poll the appropriate server location for updates. The client computer must be configured to use the application launcher provided with the Updater Application Block to start applications that will be dynamically updated this allows them to be updated while running.
Figure 1.0 shows the architecture of an application update solution implemented using the Updater Application Block.
Updating applications with the Updater Application Block
In Figure 1, shows the following aspects of the Updater Application Block:
The documentation provided with the Updater Application Block includes detailed information about preparing the server and client computers and configuring the Updater Application Block.
Developing Applications Using the Updater Application Block
You can develop controllers, downloaders, validators, and post-processors for use with the Updater Application Block.
A controller is an application that starts / stops the application updater and responds to its events. You can develop a controller by referencing the Microsoft.ApplicationBlocks.ApplicationUpdater.dll assembly and consuming the public interface of the ApplicationUpdateManager class. The ApplicationUpdateManager class provides StartUpdater and StopUpdater methods to control the running state of the update process and a number of events that are fired at specific stages in the update process. The Console and Service QuickStart applications provided with the Updater Application Block demonstrate how to develop controllers.
You might also consider developing a self-updating application. In this scenario, the application being updated is also the controller. The SelfUpdating QuickStart provided with the Updater Application Block demonstrates how to build a self-updating application.
A downloader is a class that copies files from a specified source to a specified destination. Downloader classes must implement the IDownloader interface defined in the Updater Application Block.
The Updater Application Block includes a downloader that uses the Background Intelligent Transfer Service (BITS) to download files from a Web folder. If you need to download application updates from a different kind of location, or if your client computers cannot use BITS, you must develop a custom downloader class that implements IDownloader and specify it in the application configuration file of the controller application used to launch the update process.
The FlexPoints QuickStart provided with the Updater Application Block includes a sample downloader that copies files from a UNC file share.
A validator is a class that can be used to generate and verify cryptographic signatures for the manifests and update files of an application update. This allows the authenticity of application updates to be checked. Validator classes must implement the IValidator interface defined in the Updater Application Block.
The Updater Application Block includes two validators, a symmetric key-based validator and an asymmetric key-based validator. If you want to use a different cryptographic algorithm to verify the authenticity of update files, you must develop a custom validator class that implements IValidator and specify it in the application configuration file of the controller application used to launch the update process.
The FlexPoints QuickStart provided with the Updater Application Block includes a sample validator that uses modular arithmetic to generate and verify signatures.
A post-processor is a class that performs any post-deployment configuration tasks that your updated application might require (such as editing registry values, creating message queues, and so on). Post-processor classes must implement the IPostProcessor interface defined in the Updater Application Block.
To develop and use a post-processor, create a class that implements IPostProcessor and includes the required functionality. Include the assembly containing the post-processor class in the application update files and specify it in the manifest for the application update the Updater Application Block will then load and execute it automatically.
The FlexPoints QuickStart includes a sample post-processor that writes information to the registry.
What types of applications can I update with the Updater Application Block?
The Updater Application Block is specifically designed to update .NET Windows applications on client computers. However, because the update process simply copies and validates files from a specified location, it could be easily adapted to update any application that can be deployed in this manner.
Why should I use the Updater Application Block instead of simply downloading Windows Forms applications through a browser?
Although you can download .NET Windows Forms applications through a browser, the application runs within a security "sandbox," causing limitations that might impact the required functionality of your application. Applications updated using the Updater Application Block are not restricted in this way.
Why should I use the Updater Application Block instead of a centralized management system such as Microsoft Systems Management Server (SMS)?
Centralized management solutions are suitable for large scale deployment and management scenarios where the necessary infrastructure and administrative expertise are in place. The Updater Application Block provides a simpler alternative that focuses on the deployment of desktop applications using a "pull" based approach rather than the "push" based semantics of most centralized management systems.
Why should I use the Updater Application Block instead of publishing applications in Group Policies?
Group Policies can be used to deploy applications in Microsoft Active Directory environments. This approach requires that all computers are members of an Active Directory domain and that all published applications are packaged for installation through the Windows Installer. The Updater Application Block is not subject to these restrictions.
Can I use XCOPY deployment to deploy the Updater Application Block assembly?
Yes. After it is compiled, the Microsoft.ApplicationBlocks.ApplicationUpdater.dll assembly can be XCOPY deployed.
Are there any other application blocks?
Yes. The Updater Application Block is one of several Application Blocks that are being released. These Application Blocks solve the common problems that developers face from one project to the next. They can be plugged into .NET applications quickly and easily.
Questions? Comments? Suggestions? For feedback on the Updater Application Block, please send an e-mail message to firstname.lastname@example.org.
The Application Blocks for .NET are designed to jumpstart development of .NET distributed applications. The sample code and documentation is provided "as-is." While it has undergone testing and is considered a robust code set, it is not supported like a traditional Microsoft product.
The GotDotNet community site provides a place for .NET developers to share code and ideas. A GotDotNet workspace for the Updater Application Block has been created at http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=83c68646-befb-4586-ba9f-fdf1301902f5. Please share your Updater Application Block questions, suggestions, and customizations with the community in this workspace.
A newsgroup has also been created to assist you with the Application Blocks for .NET. Use this newsgroup to consult with your counterparts, peers, and Microsoft Support Professionals in an online, open forum. Everyone else benefits from your questions and comments, and our development team is monitoring the newsgroup on a daily basis: Newsgroup: Web-Based Reader http://msdn.microsoft.com/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microsoft.public.dotnet.distributed_apps
Newsgroup: NNTP Reader news://msnews.microsoft.com/Microsoft.public.dotnet.distributed_apps
Do you want to learn and harness the power of .NET? Work side-by-side with technology experts at the Microsoft Technology Centers to learn development best practices. For more information, please visit http://www.microsoft.com/business/services/mtc.asp.
The Updater Application Block has been designed to provide a "pull" based solution for .NET application deployment. For more information about deployment scenarios and the appropriate solutions available, see Deploying .NET Applications: Lifecycle Guide on MSDN.
Many thanks to the following contributors and reviewers:
Thanks, also, to the content team: Edward Lafferty, Sameer Tarey (Infosys Technologies Ltd), Ashish Babbar (Infosys Technologies Ltd), Tina Burden (Entirenet), and Kathy Ferguson (Entirenet).
|Contact Us | E-Mail This Page | MSDN Flash Newsletter | Legal|