Introduction

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:

  • Implement a "pull" based update solution for .NET applications.
  • Use cryptographic validation techniques to verify the authenticity of application updates before applying them.
  • Perform post-deployment configuration tasks without user intervention.
  • Write applications that automatically update themselves to the latest available version.

    Note   This Application Block for .NET has been designed based on reviews of successful .NET applications. It is provided as source code that you can use "as-is" or customized for your application. It is not an indication of future direction for application deployment within the Microsoft .NET Framework. Future releases of the .NET Framework may address application deployment using a different model.

The remainder of this overview is divided into the following sections:

What Does the Updater Application Block Include?

Downloading and Installing the Updater Application Block

Using the Updater Application Block

Frequently Asked Questions

Feedback and Support

More Information

Collaborators

What Does the Updater Application Block Include?

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:

  • Microsoft.ApplicationBlocks.ApplicationUpdater.Quickstarts.ConsoleTest

    This QuickStart shows how to develop a console-based controller for the update process.

  • Microsoft.ApplicationBlocks.ApplicationUpdater.Quickstarts.Service

    This QuickStart shows how to develop a service-based controller for the update process.

  • Microsoft.ApplicationBlocks.ApplicationUpdater.Quickstarts.SelfUpdatingTest

    This QuickStart shows how to develop a self-updating application.

  • Microsoft.ApplicationBlocks.ApplicationUpdater.Quickstarts.FlexPoints

    This QuickStart shows how to develop custom downloader, validator, and post-processor classes.

The Documentation

Comprehensive documentation is provided. This includes the following main sections:

  • Design of the Updater Application Block – This section includes background design philosophy information that provides insights into the design and implementation of the Updater Application Block.
  • Developing Applications with the Updater Application Block – This section includes information that helps you develop controllers, downloaders, validators, and post-processors for use with the Updater Application Block.
  • Deployment and Operations – This section includes installation information; it describes deployment, configuration, and security options.
  • Reference – This is a comprehensive API reference section that details the public classes and interfaces comprising the Updater Application Block.

System Requirements

To run the Updater Application Block, you need the following:

  • Microsoft Windows® 2000, Windows XP Professional, Microsoft Windows Server 2003
  • Microsoft .NET Framework version 1.1
  • Visual Studio .NET 2003 (recommended but not required)

Downloading and Installing the Updater Application Block

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.

Using the Updater Application Block

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.

Figure 1.0

Updating applications with the Updater Application Block

In Figure 1, shows the following aspects of the Updater Application Block:

  1. On the server, the manifest utility supplied with the Updater Application Block is used to generate a manifest file for each application update. The manifest lists all the files included in the update, a hashed signature for each file (including the manifest itself), and optionally a post-processor to be executed on the client after the files are downloaded and validated.
  2. A controller application is used to start and stop the core application updater, which is implemented in the Updater Application Block. Controllers are applications that start / stop the application updater and respond to its events. You can use one of the controllers provided as QuickStart applications or develop your own. The application configuration file associated with the controller is used to determine three fundamental configuration settings for the application update process:
    1. The applications to be updated, including the location of the client configuration file and server manifest file used to determine the latest version of the application on the client and on the server.
    2. The downloader component to use when copying files. Downloader components 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 copy files. Additionally, you can develop your own custom downloaders.
    3. The validator component that should be used to validate the downloaded files. Validator components 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 RSA public/private key-based validator. Additionally, you can develop your own custom validators.
  3. The application updater periodically initiates the update process. When this happens, the application updater uses the specified downloader to copy the manifest file for each application specified in the application configuration file to the client. If updates are available, the downloader copies the updated files to a temporary directory on the client.
  4. The application updater loads the specified validator and validates the downloaded files. If the files are valid, they are copied to the appropriate application folder and the configuration file for the application launcher is updated to reflect the new version.
  5. If a post-processor was specified in the manifest, the application updater loads and executes it.

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.

Developing Controllers

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.

Developing Downloaders

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.

Developing Validators

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.

Developing Post-Processors

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.

Frequently Asked Questions

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.

Feedback and Support

Questions? Comments? Suggestions? For feedback on the Updater Application Block, please send an e-mail message to devfdbck@microsoft.com.

The Application Blocks for .NET are designed to jumpstart development of .NET distributed applications. The sample code and documentation is provided "as-is." Support is available through Microsoft Product Support for a fee.

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.

转载于:https://www.cnblogs.com/superch0054/archive/2004/10/22/4010241.html

Updater Application Block for .NET相关推荐

  1. Updater Application Block v1.0 翻译文档目录

    为方便大家阅读有关Updater Application Block v1.0 的翻译文章,在本文中列出最近翻译的相关文章目录. Updater Application Block v1.0 介绍 U ...

  2. Microsoft Updater Application Block 1.5.3 服务器端manifest文件设计 [翻译]

    Microsoft Updater Application Block 服务器端manifest文件设计 译者:Tony Qu Manfest文件用于列出一次升级所需要的所有的文件,它与验证签名相关联 ...

  3. Updater Application Block for .net 2.0 发布了

    Updater Application Block for .net 2.0 终于发布了,做smart client的兄弟来下载吧! 另外 Smart Client Application Block ...

  4. Microsoft Updater Application Block 1.2.1 核心设计(core design) [翻译]

    Microsoft Updater Application Block 核心设计(core design) 译者:Tony Qu Updater Application Block由一个核心应用程序升 ...

  5. Microsoft Updater Application Block 1.4.3 KeyValidator类设计 [翻译]

    Microsoft Updater Application Block KeyValidator类设计 译者:Tony Qu KeyValidator类提供一个基于对称密钥的验证器,该章节将介绍Key ...

  6. 近期工作:Updater Application Block (UAB)继续

    阅读: 1.Using Updater Block   by Praveen Nayak http://www.codeproject.com/csharp/VanillaUpdaterBlock.a ...

  7. 感觉 Data Access Application Block(DAAB) 里也有可能写得不太好的地方

    昨天下载了博客园的代码,里面有一个 Data\SqlServer.cs 我不清楚是不是 MS DAAB 里的原样文件.不过前面有声明如下: // =========================== ...

  8. 黄聪:Microsoft Enterprise Library 5.0 系列教程(九) Policy Injection Application Block

    代理对象(Proxy Object)会通过Handler链定位到真实对象(Real Object),而Policy则被注入到代理对象和真实对象中.整个流程如图: 我个人对Policy Injectio ...

  9. 1,Composite UI Application Block (CAB) 介绍

    微软开发了一套开源的企业库 (Enterprise Library),通过使用这套企业库里面提供的各种应用程序块可以极大的提高应用程序的开发效率和缩短开发周期,也由此得到了大家的广泛应用. 企业库包括 ...

最新文章

  1. npm-run 自动化
  2. 高德渲染网关Go语言重构实践
  3. 有子对象的派生类的构造函数
  4. “阿里味” PUA 编程语言火上GitHub热榜,标星2.7K!
  5. thinkphp 5数据库操作
  6. AVS 分像素运动估计优化算法
  7. realme GT大师版核心参数曝光:同样一亿像素主摄
  8. 面试官最爱的 volatile 关键字,这些问题你都搞懂了没?
  9. 百度编辑器UEditor修改成支持物理路径
  10. 程序开发基础学习五(json配置、解析文件,c++篇)
  11. DataStudio 编辑器快捷键列表
  12. 对计算机课程的总体认识,对计算机基础课程的认识(浅谈计算机基础课程教学中计算思维的培养)...
  13. Pr:音频和视频的同步
  14. apple 关闭双重认证_如何在Apple Mail中关闭联系人和事件建议
  15. 常用单词3000 php,常用英语单词大全,英语最常用单词3000个。
  16. Postek博思得打印机
  17. Python实现统一社会信用代码合法性校验
  18. txt文件转csv文件乱码问题
  19. 人工智能——问题求解
  20. 【Box3引擎摄像机扩展】Box3CameraLag Box3CameraBessel

热门文章

  1. 去 BAT 面试,总结了这 55 道 MySQL 面试题!
  2. 如何用九条命令在一分钟内检查 Linux 服务器性能?
  3. 如何在一分钟内搞定面试官?
  4. windows 下更新 npm 和 node
  5. Java:写2个线程,其中一个线程打印1-52,另一个线程打印A-Z,打印顺序应该是12A34B56C...5152Z。
  6. 12:MYSQL 使用函数创建自增序列管理表(批量使用自增表,设置初始值,自增幅度)
  7. 38.C++修饰构造函数的explicit关键字
  8. Andriod --- JetPack (五):DataBinding + LiveData +ViewModel 简单实例
  9. 【Scratch】青少年蓝桥杯_每日一题_5.25_排序
  10. php 数组交集函数,PHP array_intersect_uassoc 函数