Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging with MS Enterprise Library

I am using MS Enterprise Library version 4.1 in my class library. In the app.config file i have inserted appropriate entries for "loggingConfiguration" and "exceptionHandling" in the config file. But, it gives a crash i.e. "The configuration section for Logging cannot be found in the configuration source."

configSections

<configSections> 
    <section name="loggingConfiguration"
             type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSetting‌​s, Microsoft.Practices.EnterpriseLibrary.Logging, 
                   Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
    <section name="exceptionHandling" 
             type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.Exce‌​ptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, 
                   Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

like image 357
Sukhminder Singh Avatar asked Mar 22 '26 19:03

Sukhminder Singh


1 Answers

as the error says, you will need to link them in your configSection as well (just entering loggingConfiguration and exceptionHandling nodes won't do).

This MSDN pages has some Hands on Labs which I found quite useful

like image 79
Bek Raupov Avatar answered Mar 25 '26 20:03

Bek Raupov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!