keyongtech


  keyongtech > dotnet.languages.* > dotnet.languages.csharp > 05/2008

 #1  
02-15-08, 11:57 AM
Andrew
Hi all,

I have this error :
Message: "The configuration section for Logging cannot be found in the
configuration source."
Source: "Microsoft.Practices.EnterpriseLibrary.Logging "

I've added in the
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Logging.Conf iguration.Design.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHan dling.Logging.dl
Microsoft.Practices.EnterpriseLibrary.ExceptionHan dling.Logging.Configuration.Design.dll

What is the meaning of "configuration source" ?
Thanks

regards,
Andrew
 #2  
02-15-08, 12:27 PM
Ignacio Machin \( .NET/ C# MVP \)
Hi,


The meaning is that at least a class inside
Microsoft.Practices.EnterpriseLibrary.Logging namespace is expecting a
section in the config file it would use to jold configration settings.
You neeed to check the help or some samples to see how that section is
configured

"Andrew" <Andrew> wrote in message
news:d54c
[..]
 #3  
02-15-08, 12:52 PM
Andrew
Hi,

Thanks for your reply.

In my app.config file, I have:

<loggingConfiguration defaultCategory="Tracing" tracingEnabled="false" >
<logFilters>
<add
name="Category"

type="Microsoft.Practices.EnterpriseLibrary.Loggin g.Filters.CategoryFilter,
Microsoft.Practices.EnterpriseLibrary.Logging"
categoryFilterMode="AllowAllExceptDenied">
<categoryFilters />
</add>
<add
name="Priority"

type="Microsoft.Practices.EnterpriseLibrary.Loggin g.Filters.PriorityFilter,
Microsoft.Practices.EnterpriseLibrary.Logging"
minimumPriority="0"
/>
</logFilters>
<categorySources>
<add
name="Default Category"
switchValue="All">
<listeners>
<add name="Event Log Destination" />
</listeners>
</add>
<add
name="Tracing"
switchValue="All">
<listeners>
<add name="Flat File Destination" />
</listeners>
</add>
</categorySources>
<specialSources>
<errors name="errors" switchValue="All">
<listeners>
<add name="Event Log Destination"/>
</listeners>
</errors>
</specialSources>
<listeners>
<add name="Event Log Destination"
type="Microsoft.Practices.EnterpriseLibrary.Loggin g.TraceListeners.FormattedEventLogTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging"
listenerDataType="Microsoft.Practices.EnterpriseLi brary.Logging.Configuration.FormattedEventLogTrace ListenerData,
Microsoft.Practices.EnterpriseLibrary.Logging"
source="Enterprise Library Logging"
formatter="Default Formatter"
/>
<add name="Flat File Destination"
type="Microsoft.Practices.EnterpriseLibrary.Loggin g.TraceListeners.FlatFileTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging"
listenerDataType="Microsoft.Practices.EnterpriseLi brary.Logging.Configuration.FlatFileTraceListenerD ata, Microsoft.Practices.EnterpriseLibrary.Logging"
fileName="C:\Projects\ABC\Output\trace.log"
formatter="Default Formatter"
/>
</listeners>
<formatters>
<add
name="Default Formatter"

type="Microsoft.Practices.EnterpriseLibrary.Loggin g.Formatters.TextFormatter,
Microsoft.Practices.EnterpriseLibrary.Logging"
template="Timestamp: {timestamp}
Message: {message}"
/>
</formatters>
</loggingConfiguration>

This should do it right? So why is it still not working ?

regards,
Andrew

"Ignacio Machin ( .NET/ C# MVP )" wrote:
[..]
 #4  
05-12-08, 04:54 PM
Vijay Modi
Hi,

You can find the solution on the followng path:

http://vijaymodi.wordpress.com/2008/...ration-source/


Regards,
Vijay Modi
Similar Threads
Configuration Failed on SharePoint Products and Technologies Confi

Hi I am trying to add a Web Front End Server to my MOSS 2007 farm. My farm consists of 1 index server, 1 database server and 1 web front end. All servers are running...

Enterprise Library Exception: The configuration section for Logging cannot be found in the configuration source.

Hi, I am getting the following exception when attempting to open a site with using the Enterprise Library Logging block: The configuration section for Logging cannot be...

Enterprise Library exception: The configuration section securityCryptographyConfiguration is not defined in the current configuration for the AppDomain.

I am attempting to use the Enterprise Library (Jan 2006) Cryptography block to encrypt a credit card number in my ASP.NET 2.0 Commerce Server application. Everything is...

Enterprise Library exception: The configuration section securityCryptographyConfiguration is not defined in the current configuration for the AppDomain.

I am attempting to use the Enterprise Library (Jan 2006) Cryptography block to encrypt a credit card number in my ASP.NET 2.0 Commerce Server application. Everything is...

EntLib Jan 2006 - configuration section for Logging cannot be foun

I have written an application that is exposed via COM+. The application uses the Logging application block and the DAAB. When the application is run via VS2005 (e.g. unit...


All times are GMT. The time now is 10:50 AM. | Privacy Policy