Invalid configuration file in application block v3

Topics: Caching Application Block , Exception Handling Application Block, Logging Application Block
Jun 13, 2007 at 8:26 PM
Hi All, I have to test Application Block to log Exception in a Database. The problem is really sample. When I use Enterprise Library Configuration to manage the configuration file, this appear in the file:


<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

I don't know why but an exception is thrown if the attributes "Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" are present in the file. This is the Exception in french:

Une erreur s'est produite lors de la création du gestionnaire de section de configuration pour exceptionHandling 
Jun 14, 2007 at 2:13 PM
I don't know French, but it looks like the error is saying it can find the ExceptionHandling assembly or one of its dependencies.

Have you referenced the proper assemblies?

Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.ObjectBuilder.dll

You also appear to be using the signed assemblies provided by P&P, so you need to make sure you are using them.

If you click on the Solution in Visual Studio and peek at the Properties, you will see where it shows which EnterpriseLibraryConfigurationSet you are using. Make sure you specify Microsoft Signed if that is what you are using and see if that helps.

Regards,

Dave

___________________________________

David Hayden
Microsoft MVP C#