RegistryManager runtime error

Topics: Updater Application Block
May 10, 2005 at 3:42 AM
originally posted by: dougiereid

Hi Everyone,

I've been getting to grips with the Updater v2.0, but I have hit a brick wall. Through VS everything works and the app downloads with no problem. When I create an install app to install it on a clients machine I am getting a error with the RegistryManager when checkforpendingupdates the line containing RegistryManager.Current.GetByApplicationId raises an exception, does anybody have any ideas ?

TIA
Dougie Reid
May 11, 2005 at 1:01 AM
originally posted by: AnuragRastogi

Hi,

Can you provide me information about the deployment scenario & brief about exception that you are encountering e.g. Stack Trace as i am not getting the clear idea from the post .
May 11, 2005 at 2:55 AM
originally posted by: dougiereid

I'm using the SampleAppStart program as a shim to load my main application, which includes some Crystal Reports. The I have created an install project for my solution which includes my main app and the AppStart project (vb). The created shortcuts point to the AppStart which then, in the app.config and the manifest points to the main app. All works well if run through the Visual Studio environment, but if I install the on the same workstation and try and run it then I get the following error

Error Information

The following error occurs first
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in microsoft.practices.enterpriselibrary.configuration.dll

Additional information: Can not find the configuration file C:\Program Files\Agilisys\EvaluationWise.NET\..\UpdaterConfiguration.config. You must check the 'path' attribute in the section 'UpdaterConfiguration'

and then

An unhandled exception of type 'System.TypeInitializationException' occurred in microsoft.applicationblocks.updater.dll

Additional information: The type initializer for "Microsoft.ApplicationBlocks.Updater.RegistryManager" threw an exception.


Class : ApplicationUpdaterManager.vb

Sub : Private Sub CheckForPendingUpdates()
Line Error Occurs: Dim pendingTasks As UpdaterTask() = RegistryManager.Current.GetByApplicationId(applicationIdOfApplicationToUpdate)

Error Message

An unhandled exception of type 'System.TypeInitializationException' occurred in microsoft.applicationblocks.updater.dll

Additional information: The type initializer for "Microsoft.ApplicationBlocks.Updater.RegistryManager" threw an exception.

Stack Trace

at Microsoft.ApplicationBlocks.Updater.RegistryManager.get_Current()
at Microsoft.ApplicationBlocks.Updater.ApplicationUpdaterManager.CheckForPendingUpdates()
May 11, 2005 at 3:03 AM
originally posted by: dougiereid

AppStart app.config contents

<configuration>
<configSections>
<section name="appStart"
type="AppStart.ConfigSectionHandler,AppStart" />
<section name="enterpriselibrary.configurationSettings" type="Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManagerSectionHandler, Microsoft.Practices.EnterpriseLibrary.Configuration" />
</configSections>
<appStart>
<ClientApplicationInfo>
<appFolderName>C:\Program Files\Agilisys\EvaluationWise.NET\app\</appFolderName>
<appExeName>EvaluationWise.NET.exe</appExeName>
<appID>{f684ab01-6fdf-49cc-bafc-7c2d1defb8cc}</appID>
<updateTime>BeforeStart</updateTime>
<manifestUri>http://dreid/evaluationwise.net/manifest.xml</manifestUri>
</ClientApplicationInfo>
</appStart>
<enterpriselibrary.configurationSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="SimpleAppStartQuickstart" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData" name="UpdaterConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="..\UpdaterConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml Serializer Transformer">
<includeTypes>
<includeType name="Xml Include Type" type="Microsoft.ApplicationBlocks.Updater.Configuration.BitsDownloaderProviderData, Microsoft.ApplicationBlocks.Updater.Downloaders" />
</includeTypes>
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
</configuration>

updaterconfiguration.config

<?xml version="1.0" encoding="utf-8"?>
<UpdaterConfiguration>
<xmlSerializerSection type="Microsoft.ApplicationBlocks.Updater.Configuration.ApplicationUpdaterSettings, Microsoft.ApplicationBlocks.Updater">
<applicationUpdater xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" applicationId="{215E1AD7-9ABA-432f-A952-24BABA556850}"
manifestUri="http://dreid/evaluationwise.net/manifest.xml" xmlns="urn:schemas-microsoft-com:PAG:updater-application-block:v2" >
<downloaders>
<downloader xsi:type="BitsDownloaderProviderData" name="BITSDownloader">
<userName></userName>
<password></password>
<authenticationScheme>BGAUTHSCHEME_NTLM</authenticationScheme>
<targetServerType>BGAUTHTARGET_SERVER</targetServerType>
</downloader>
</downloaders>
</applicationUpdater>
</xmlSerializerSection>
</UpdaterConfiguration>
May 11, 2005 at 3:32 AM
originally posted by: dougiereid

Manifest.xml

<?xml version="1.0" encoding="utf-8" ?>
- <manifest manifestId="{3425f5d4-2c63-42a2-86ae-affecc279833}" mandatory="False" xmlns="urn:schemas-microsoft-com:PAG:updater-application-block:v2:manifest">
<description>Manifest for EvaluationWise.NET</description>
- <application applicationId="{f684ab01-6fdf-49cc-bafc-7c2d1defb8cc}">
<entryPoint file="EvaluationWise.NET.exe" />
<location>c:\Program Files\Agilisys\EvaluationWise.NET\app\</location>
</application>
- <files base="http://dreid/evaluationwise.net/updates/">
<file source="EvaluationWise.NET.pdb" />
<file source="EvaluationWise.NET.exe" />
</files>
- <activation>
- <tasks>
<task type="Microsoft.ApplicationBlocks.Updater.ActivationProcessors.ApplicationDeployProcessor, Microsoft.ApplicationBlocks.Updater.ActivationProcessors" name="ApplicationDeployProcess" />
</tasks>
</activation>
</manifest>
May 12, 2005 at 2:55 AM
originally posted by: AnuragRastogi

Hi ,

The probable reason for the stated errors is that updater is unable to locate the updaterconfiguration.config file. you might need to verify that the application setup copies the updaterconfiguration.config file at the path specified in app.config on the machine.
May 13, 2005 at 5:30 AM
originally posted by: dougiereid

Superb, thanks very much.
Oct 21, 2009 at 9:47 AM

Hi,

I'm also suffering from the same problem although my updaterconfiguration.config file is located at the path specified in app.config. As I've learned from other discussions that user might not have permission to create directory UAB, but actually it has this permission in my case. What can be the other possible reasons for this error.