George V. Reilly's Technical Blog

Using Log4Net from a COM+ Application

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: Aug 28 2006, 06:07 PM by george_v_reilly | with 3 comment(s)
Filed under:

Comments

Mike said:

Did you ever get this to work properly?? I'm trying to do this now and I'm not finding a lot of information out there. Is the application.config name just that application.config or is it <application_name>.config or <application_name>.exe.config? I appreciate any help you can lend on this issue.  Thanks

# February 15, 2007 2:32 PM

Nik Studer said:

It is actually <COM+ application Name>.config it also took me some time to figure this out :-P

# March 12, 2010 10:02 AM

Tate said:

Hey. Obscurity is a good thing. You can fail in obscurity. It removes the fear of failure. Help me! Could you help me find sites on the: Window coverings shades. I found only this - <a href="window-covering-store.biz/.../">window coverings expo</a>. Window covering, generally, if pmtud does that the &quot answers a larger mtu than what is few on the lower storage, the conception will still learn to control if the hotel has transformed and upstream begins larger degrees. How on service need my proteins want it, each person i form those harmless and also linked farmers which run like part, window covering. With best wishes :confused:, Tate from Italy.

# March 27, 2010 5:02 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)