Microsoft Updater Application Block Application installer configuration file Design
Translator: Tony Qu
This file contains information about the polling interval, log location, the file to be used, and the validators, as well as the specific information about each application to be included during the upgrade process. For each application, the file contains the client settings (such as the location of the client configuration file) and server settings (such as the location of the manifest file required for upgrading a specific application ).
The application installer configuration file is an application configuration file associated with the controller application. It is used to initialize the upgrade process and is often stored in the same directory as the controller executable file.
The ApplicationUpdater set contains many object-oriented classes that provide setup information. These classes are obtained from the configuration file deserialization and are used in internal application Uploader components.
Problem description
The administrator needs to be able to specify the following settings for the Application Installer:
1. How long does the application installer check for updates?
2. Where to store Log Data
3. Which download tool is used to copy files?
4. Which validators are used to verify the manifest file and other files?
5. application information to be upgraded, including the client configuration file location and application manifest File Location
Design goals, trade-offs, and problems
The Updater Application Block developer identifies the following design goals, trade-offs, and problems related to the Application installer configuration file:
1. The configuration file must allow the Administrator to specify the polling interval, log file location, download and validators, and the list of applications that can be upgraded.
2. to optimize performance, all applications must use the same download and validators.
3. In the test environment, it is wise to disable application verification. UseValidation is included in the Schema of the file.
Solution description
There is a <appUpdater> Configuration section in the application Updater configuration file. All application updaters are configured in this section.
Implementation
The following example demonstrates an application installer configuration file:
<? Xml version = "1.0" encoding = "UTF-8"?>
<Configuration>
<ConfigSections>
<Section name = "appUpdater" type = "Microsoft. ApplicationBlocks. ApplicationUpdater. UpdaterSectionHandler, Microsoft. ApplicationBlocks. ApplicationUpdater"/>
</ConfigSections>
<AppUpdater>
<UpdaterConfiguration>
<Polling type = "Seconds" value = "120"/>
<LogListener logPath = "C: \ AppUpdaterDemo \ client \ UpdaterLog.txt"/>
<Downloader type = "Microsoft. ApplicationBlocks. ApplicationUpdater. Downloaders. BITSDownloader" assembly = "Microsoft. ApplicationBlocks. ApplicationUpdater, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null">
</Downloader>
<Validator type = "Microsoft. ApplicationBlocks. ApplicationUpdater. Validators. RSAValidator" assembly = "Microsoft. ApplicationBlocks. ApplicationUpdater, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null">
<Key>
<RSAKeyValue>
<Modulus> tHImy41ZOphETPcWQznlNF6/etc. </Modulus>
<Exponent> AQAB </Exponent>
</RSAKeyValue>
</Key>
</Validator>
<Application name = "App1" useValidation = "true">
<Client>
<BaseDir> C: \ App1 </baseDir>
<XmlFile> C: \ App1 \ AppStart.exe. config </xmlFile>
<TempDir> C: \ App1 \ temp </tempDir>
</Client>
<Server>
<XmlFile> http: // appserver/appupdates/App1/Manifest. xml </xmlFile>
<XmlFileDest> C: \ App1 \ Manifest. xml </xmlFileDest>
<MaxWaitXmlFile> 60000 </maxWaitXmlFile>
</Server>
</Application>
<Application name = "App2" useValidation = "true">
<Client>
<BaseDir> C: \ App2 </baseDir>
<XmlFile> C: \ App2 \ AppStart.exe. config </xmlFile>
<TempDir> C: \ App2 \ temp </tempDir>
</Client>
<Server>
<XmlFile> http: // appserver/appupdates/App2/Manifest. xml </xmlFile>
<XmlFileDest> C: \ App2 \ Manifest. xml </xmlFileDest>
<MaxWaitXmlFile> 60000 </maxWaitXmlFile>
</Server>
</Application>
</UpdaterConfiguration>
</AppUpdater>
</Configuration>
For more information, see configure the application installer.