logging doesn't work when VB6 app calls .Net component that uses EntLib

Topics: Exception Handling Application Block, Logging Application Block
Jun 11, 2008 at 2:03 PM
Edited Jun 11, 2008 at 2:50 PM
I have written a .Net 2.0 web app that has UI, BL and DA components. All the components are using EntLib 3.1 logging block and logging works just fine. There is also a VB6 app that is calling the BL component, and when that's happening, logging doesn't work...

I think the way it's supposed to be working is that the point-of-entry application reads the configuration settings and those are used by all the components invoked by the point-of-entry application. Since VB6 cannot read configuration settings for EntLib 3.1 I have put all the configuration settings for EntLib 3.1 logging block in the machine.config file, hoping that the BL component would read them from there when called from VB6.

The web application is reading these settings off of the machine.config.

I have then created a (.Net 2.0) desktop application - driver - that is mimicking what the VB6 app would do: calling the BL component. The driver does not have any configuration settings for EntLib 3.1 logging block. However, when invoked from the driver, all the components (BL, DA) are logging, which is what I expected. I'm not sure though my test is conclusive, because the driver being a .Net 2.0 application, it is getting it's configuration settings from machine.config, which is different than a VB6 app that would not have any configuration settings at all...

Any ideas on how to get my .Net 2.0 components to log when invoked by a VB6 app?

Stefan




Jun 11, 2008 at 7:28 PM
Hi,

You may want to try the general approach described in http://blogs.msdn.com/bethmassi/archive/2007/10/24/using-my-settings-and-wcf-configuration-with-the-interop-forms-toolkit.aspx.
I haven't tried it myself. Please post your results back to this thread.

Fernando


DrStefan wrote:
I have written a .Net 2.0 web app that has UI, BL and DA components. All the components are using EntLib 3.1 logging block and logging works just fine. There is also a VB6 app that is calling the BL component, and when that's happening, logging doesn't work...

I think the way it's supposed to be working is that the point-of-entry application reads the configuration settings and those are used by all the components invoked by the point-of-entry application. Since VB6 cannot read configuration settings for EntLib 3.1 I have put all the configuration settings for EntLib 3.1 logging block in the machine.config file, hoping that the BL component would read them from there when called from VB6.

The web application is reading these settings off of the machine.config.

I have then created a (.Net 2.0) desktop application - driver - that is mimicking what the VB6 app would do: calling the BL component. The driver does not have any configuration settings for EntLib 3.1 logging block. However, when invoked from the driver, all the components (BL, DA) are logging, which is what I expected. I'm not sure though my test is conclusive, because the driver being a .Net 2.0 application, it is getting it's configuration settings from machine.config, which is different than a VB6 app that would not have any configuration settings at all...

Any ideas on how to get my .Net 2.0 components to log when invoked by a VB6 app?

Stefan