We've been logging from COM+ for a number of years now, and do so by loading a log4net configuration XML fragment from a centralised config file. We've experienced no problems loading the configuration this way.
Regards Ian Dykes - Software Developer Esendex Ltd 32a Stoney Street Nottingham NG1 1LL http://www.esendex.com Tel: +44 (0) 115 852 5762 Fax: +44 (0) 115 852 5757 Recommend Esendex's Business SMS service to a friend or colleague and you can earn up to £100 in High Street Gift Vouchers when they sign up. Go online to make your recommendation today. https://www.esendex.com/uk/recommend/recommend.aspx -----Original Message----- From: Duncan Woods [mailto:[EMAIL PROTECTED] Sent: 07 November 2006 17:57 To: Log4NET User Subject: RE: Logging from COM+ For COM+ I use a reg setting to locate the log4net file and then perform manual configuration when the com+ is first created. I remember that on an old server, there were some weird difficulties logging to the event log. It could have been win2k or a credential problem with the account the com+ app was using. Thanks, Duncan -----Original Message----- From: Tom Greasley [mailto:[EMAIL PROTECTED] Sent: 07 November 2006 14:57 To: Log4NET User Subject: Re: Logging from COM+ COM+1.5 = XP and above, so in terms of server software, yes it's only supported in Windows Server 2003+ Tom Greasley Jeremy Wiebe wrote: > Wow! This is great news. From the looks of your posting there this is only supported in Windows Server 2003, correct? (which means that for older server deployments like Win2000 we still have to use the dllhost.exe.config hack). > > Thanks for that!! > > Jeremy Wiebe > > > -----Original Message----- > From: Tom Greasley [mailto:[EMAIL PROTECTED] > Sent: November 7, 2006 8:47 AM > To: Log4NET User > Subject: Re: Logging from COM+ > > > COM+ allows you to specify an application root directory for each > package. .NET will look in the root directory for a configuration file > called application.config. This is a lot cleaner than using > dllhost.exe.config. > > See here: > > http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=0615b3cc-0fb f-4cf5-9d49-ae95b50f7e8d > > Tom Greasley > > Jeremy Wiebe wrote: > >> I may be missing the point here, but I'll comment and you can correct me. :-) >> >> The original poster is looking for instruction on how to use log4net in COM+ (and by that I'm assuming it's a .NET class in COM+ made by inheriting from System.EnterpriseServices.ServicedComponent). >> >> The configuration depends on your usage of COM+. If you are deploying your component as a Library Application, then the typical log4net configuration should be fine as the COM+ component will run "in-process" of your application. >> >> However, if you are deploying your COM+ component as a Server Application, it will be hosted in the COM+ host application dllhost.exe. As a result you need to put the configuration in %SYSTEMROOT%\System32\dllhost.exe.config. (It will most likely not exist so just create a standard .NET configuration file with a log4net section. >> >> You'll also need to ensure that if you want to log to a file from a Server Application that the identity you are running the application as has permissions to write to the place you want your log file to be created. >> >> Hope that helps! >> >> Jeremy Wiebe >> >> -----Original Message----- >> From: Ron Grabowski [mailto:[EMAIL PROTECTED] >> Sent: November 6, 2006 10:07 PM >> To: Log4NET User >> Subject: Re: Logging from COM+ >> >> >> I think what he's looking for is how to build it. NLog comes with an >> NLog.ComInterop.dll. I would imagine its possible to make something >> similiar with log4net. Unless you're required to use log4net I would >> just download NLog spend a couple minutes configuring it then go about >> focusing on your application and not spend days trying to figure out >> how to do it with log4net. >> >> Has anyone on the list built log4net for use by COM? >> >> >> >> ----- Original Message ---- >> >> From: Shireesh Thanneru <[EMAIL PROTECTED]> >> >> To: Log4NET User <log4net-user@logging.apache.org> >> >> Sent: Monday, November 6, 2006 4:00:18 PM >> >> Subject: Re: Logging from COM+ >> >> >> >> Yes, it is possible. You can try and see. >> >> >> >> ashish agarwal <[EMAIL PROTECTED]> wrote: Hi, >> >> >> >> I have a classic asp application which is having >> >> several COM+ components.I want to use Log4Net for >> >> logging from this application,is it possible.Is >> >> Log4Net supports logging from com+.kindly let me know >> >> as the requirement is urgent. >> >> >> >> Thank you >> >> >> >> Ashish >> >> >> >> >> >> >> >> >> >> >> >> ________________________________________________________________________ __________________ >> >> Sponsored Link >> >> >> >> Talk more and pay less. Vonage can save you up to $300 a year on your phone bill. >> >> Sign up now. http://www.vonage.com/startsavingnow/ >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > > > >