Monday, August 28, 2006 
« Posting to dasBlog with Windows Live Wri... | Main | Moving Offices »

I spent far too much time on Friday trying to make log4net work in a COM+ application.

Someone else had done part of the work necessary, by creating an application.config for the COM+ application and setting a custom Application Root Directory. This was enough to ensure that most of the managed code in the application got their configuration settings; log4net being the

It took some additional work to realize that we needed to add two assembly attributes:

[assembly: log4net.Config.Repository("unique-name")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile="application.config")]

The repository name just needs to be a unique string. We used the name of the assembly.

posted on Tuesday, August 29, 2006 1:07:15 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Related posts:
64-bit Windows 7
Mobile Device Browser File
Odds and Ends #5
Building a REST Web Service, day 1
Serializing a NameValueCollection
NUnit calling CppUnit