Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The configuration section for Logging cannot be found in the confi

0 views
Skip to first unread message

Andrew

unread,
Feb 15, 2008, 6:57:00 AM2/15/08
to
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.Configuration.Design.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Configuration.Design.dll

What is the meaning of "configuration source" ?
Thanks

regards,
Andrew

Ignacio Machin ( .NET/ C# MVP )

unread,
Feb 15, 2008, 7:27:51 AM2/15/08
to
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" <And...@discussions.microsoft.com> wrote in message
news:1E452634-4E6A-4011...@microsoft.com...

Andrew

unread,
Feb 15, 2008, 7:52:01 AM2/15/08
to
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.Logging.Filters.CategoryFilter,
Microsoft.Practices.EnterpriseLibrary.Logging"
categoryFilterMode="AllowAllExceptDenied">
<categoryFilters />
</add>
<add
name="Priority"

type="Microsoft.Practices.EnterpriseLibrary.Logging.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.Logging.TraceListeners.FormattedEventLogTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData,
Microsoft.Practices.EnterpriseLibrary.Logging"
source="Enterprise Library Logging"
formatter="Default Formatter"
/>
<add name="Flat File Destination"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"
fileName="C:\Projects\ABC\Output\trace.log"
formatter="Default Formatter"
/>
</listeners>
<formatters>
<add
name="Default Formatter"

type="Microsoft.Practices.EnterpriseLibrary.Logging.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

vijaymodi

unread,
May 12, 2008, 11:54:34 AM5/12/08
to
0 new messages