Microsoft Application Blocks - Application Updater, Using the Manifest UtilityNo Touch Deployment | | How do I get started with "No Touch Deployment?" I can wait until the release of VS 2005, or I can use the Microsoft Application Updater Block now!
In my previous article, I started a summary of the Updater Application Block. In this article I will discuss the use of the Manifest Utility, with which you create a Manifest that tells the Updater Application Block when and where a new version is created, ready for downloading.
The manifest utility is a Windows Forms application that allows users to specify the information outlined below.
The local location of the update files (so they can be added to the manifest)
The network location of the update files (so the <updateLocation> element can be created)
The application version number
The key used to generate validation signatures (Users can enter this or use the manifest utility to generate a public/private key pair.)
The validator to be used to generate the signatures
The assembly, type, and file location of the post processor to be executed on completion of the update
The source code for this application is provided with the download from the Patterns and Practices link at Microsoft. You could create the manifest file with any text editor, but considering the content of the file, I strongly recommend that you utilize the utility provided. You can look at the file by searching your computer for ServerManifest.xml. Figure 1 shows the Manifest Utility form when executed.
Using the Manifest Utility
Figure 1 - Manifest Utility

To create a manifest, start the manifest utility and enter the following information listed below. You can use the Manifest Utility to generate Key files by selecting the File, Generate Keys menu option. You will be prompted to select a location for both a PublicKey and PrivateKey file. When you select these locations, the utility will create two files with default names of PublicKey.xml and PrivateKey.xml in the location that you supplied. The keys are saved as XML files, which you can copy and paste into the manifest utility's Key text box and the application updater file. You should paste the private key into the manifest utility's Key text box, and the public key into the application's updater file. Figure 1 shows the private key generated by the Generate Keys menu option when I used it. I then used the browse button on the Key TextBox to point to the PrivateKey.xml file.
Should you receive an error, "Invalid character in a Base-64 string", try setting the contents of the Validator Class Combo Box to RSA Validator. This should clear that problem.
- Update files folder - The local path to the folder containing the update files. You can use the ellipsis (...) button to browse for this folder. The files in this folder are enumerated and added to the manifest as <file> elements.
- Update location - The network path used by the updater to access the update files. This is used to generate the <updateLocation> element in the manifest file. The actual kind of location (Web folder, UNC file share, FTP folder, etc.) depends on the downloader being used.
- Version - The version of the application that is available from the server. This is used to generate the <availableVersion> element in the manifest file.
- Key - The cryptographic key used by the validator to generate signatures. The ellipsis button next to the Key text box opens a dialog box that allows you to browse the file systems for the file containing your key.
- Validator assembly - Use the ellipsis button to select the NET assembly containing the validator you want to use to generate signatures.
- Validator class - When a validator assembly is selected, this drop-down list contains all of the validator classes in the assembly. Select the validator you want to use to generate signatures. (This should be the same validator that will be used by the application updater on the client to verify the signatures.)
- Post processor - Select this option if you want to specify a post processor in the manifest. The post processor information is used to generate the <postProcessor> element in the manifest file.
- Post processor assembly - Use the ellipsis button to select the .NET assembly containing the post processor you want to specify in the manifest. This assembly should be included in the update files.
- Post processor class - Select the post processor class in the post processor assembly that you want to specify in the manifest.
Figure 2 shows an XML file created by the Manifest Utility, using the settings shown in Figure2. I have included this un-readable (mess) file, so that you can see that you would not want to try to create this file without the use of the Manifest Utility. I have inserted new line characters in the very long strings for readability purposes.For further detail concerning the manifest, validation, and post processors, see the help file for the Updater Application Block.
Figure 2 - Manifest File.
- <ServerApplicationInfo signature="trCvIC8iRzjouExo1i8N4Wmnj0kNO1q4Wh9r6bZJQ
BnKeu0xEg7BptlurhjVilp3ojNxbuCbvieR+u+nkUDj2mZQDU/jIkiL9VbHID3HYELTH
Lt4tAcuMxxfhsow90AGdJ9mQHnBzn+WT0fIVoRm1xtsP9dSZoaStOiqfHZLgF4=">
<availableVersion>2.0.0.0
<updateLocation>http://localhost/appupdater
- <files>
<file name="ApplicationUpdater.xml" signature="KciDI76DoQn9zbWKbdTOiw5KjFK122edzU
GpJLTt+LeqxGrgtmUvY5EzlZQ3qhnqbeEF0Vjl1WUbQQsxfCQsGcj1DmYfFCZEqCtfzs2qe
OgpNDZFt/l0QC5K/So4CUF2I1fOpK2v7e1SI8Bnw08VZVHhRi2Nfz/ER9qy89xPlnM=" />
<file name="Interfaces.xml" signature="a7ypdcdfPXHsLUg6vvaWBADS6ji6Ecp
0gOiSInJkPexCLFNcAQmSbe7AlrjBPxLA///YEHJoha1oE9zmH8rUpJUcZ2s
7nATsE8DDcTgGm9/0d2XkuET6LtFpxLOuT6v9S/Ae6Ed7LCN08F5uCdj4+tY
OgHvxqy6oO/tbspEbMUw=" />
<file name="ManifestUtility.exe" signature="CYfZqyjPHnXg
JdiDCyiyU1JXb/TLpJfzTyTBn2/KCx6O5WVIyGpA6+FT3sqziYVab+
B4qsCs8tCThhZHGWxqtp9EBmBsv1rYC1RNHbJAfa
KlEYo35Mv8QFhwLOvuIaLUH/I2e7j6Ufk/DjyWd8VfndJhyaLdg75F2zQCBQU7L7Y=" />
<file name="ManifestUtility.pdb" signature="o+gK8t7z8KzIqo72Nxqu+hjwwqSY3IdS
AdOdXm82S2syT7dtI1Cfi854SaqfGSCtBrHO+z08GiRAAS/DtmrMrPlqiddMpkp
Oip1eKovyFRfhhzzQ00VmhcAqClLcmlBbBMQihJjQFnmXoas6r9yd
ED4mpks/JfMyP7PRzqCsAIo=" />
<file name="Microsoft.ApplicationBlocks.ApplicationUpdater.dll"
signature="zyZsb+q1mMQ04YyGAWKZxMcrN0SRIGPY8rcB+9t+
WS0WFelUIHDqiYa6BuwvT0kmBeusO/jd7aN554BR97y3r
lUlTEdoGyvigrHVGodqIbE5HA7hlWr2KpHn32ScuH2+O/9rKxUj6mLrs
PxTN+iaLNKxT83OSEA2vM1WFwgxgj0=" />
<file name="Microsoft.ApplicationBlocks.
ApplicationUpdater.Interfaces.dll" signature="bqKvFQf/HfcmzQ0LcrLJFFIP8Srk
B/5YjYTFejGTik2e2tVRl7S3w/TUqg2hb0Ar3Y1AJ7wdHg0yU9ioqna0P
FxrsdG3EEWqep1fG8aHGZFwy0ImFsf8p0vdi0KpIIvuH9dlAZU1RZlPu
Obr7S3S0O7cKzLNgPNXprFVARWpTQw=" />
<file name="Microsoft.ApplicationBlocks.ApplicationUpdater.
Interfaces.pdb" signature="asiJ6jliNV97VtOj4OejqcepaeNswg/
H77ivtCcmSIpXAcduOwObzItS/hNR0BEyjJYcNIYmeSKCRg+ghNon7
KcGgbNQYfY4YJiTSWsIA3jCL5reGZApCkN//9sVwyL8MCF7N
6g1auKSqktAlBqs9qVRgu2+/tBXnWWbKeycpis=" />
<file name="Microsoft.ApplicationBlocks.ApplicationUpdater.
pdb" signature="AruWrj8Stpd196FtmWBqe8HbbGhqacUGmY
NHjrq8SnHSW9nktJ0+9dinqkvDMj3JKVVOPm5agO+2CGxyL5E7a
DbsgCxTslOirCzyCuEXZOvBDCwdywkKTo5Y/ywr/0p05QKpSo6cKu
FH8IImhd8Qd1ot2MVbx3qeUkY/q3W4pyA=" />
<file name="Microsoft.ApplicationBlocks.ExceptionManagement.
dll" signature="xKNdrvdi0W6xKWzRVtCljgpxc2n9gp
JBfhQ4/R9KzzYFdu/CEmSfj+gsLCYhkNriwdtXvmgpi0IH8EXe6oGrZ
QgzdhQdG/HH5fUt5CDg+RobZYJuRnovTXRODgLEck/4V5bYNrb
CNYrhMde7yTMGl4yu+bJzewFX87hB2KBNLIU=" />
<file name="Microsoft.ApplicationBlocks.ExceptionManagement.Interfaces.dll"
signature="NxzO+2+X+ijK+1UOYRUd6V/vnkzOGWfM0LKl/lOAH482xriV92
/8gkd/ePtHF5F3OkPQ+cjXJP1cTn5z+mWgzxRieO20Ts4ijM5ilIZTzs5tO7I
SaulCpdnOGyI9BKayM2mrQw7eweyQEU9ZSfaRrdhfmW6+OHIQNYAcoU6PaK0=" />
<file name="Microsoft.ApplicationBlocks.ExceptionManagement.
Interfaces.pdb" signature="x+OVOjp/4ZAk6YXxB0LUhFcHckNcfXZ7
aKonF4J5nj6rpUyIW3GZND6sKmD2R5/xRB37BldjO9b
WcCYAZ/2giPGIF94ipVMx17zieDDi4qv5bgen//69oDLvL7
DlG+SQYTy3yO3kcFLDVLz8PWeDfhAk+v93MJ8li+nqCt+6P1Q=" />
<file name="Microsoft.ApplicationBlocks.
ExceptionManagement.pdb" signature="nOyEKdzIl0p7YYYJy5K5OqFPWHZTB
3x+/JwLLyMLmxPjpanPe+davRwXWvVywA7FCG17jJyOyK3p/c
Wq5cF0xQ68hBfmJF9CFHO/sR9SDUii1YbuV5Xhz78fT5hW+N
ObD2DCj1DgMBULEVu5hcrz5YLqxwWDAQ4E70c7KtuIcUM=" />
|
|