I have a log component that gets information from config file and the factory
create an instance of implementation that I wish. Now I need to use the log
component for a new service component. The start process is ddlhost.exe but I
can't create file dllhost.exe.config because this configuration is not common
for all. I read some articles where I can create a manifest and config file
for the application and set the root folder on COM+. I done this but didn't
work. Everyone can help me or send links about how can I do this?
[]'s
Mauricio
Bryan Phillips - 27 Oct 2006 02:39 GMT
If you are using .Net 2.0, you can call the OpenExeConfiguration method
on the System.Configuration.ConfigurationManager class. It takes a path
to the file to open.
If you are not using .Net 2.0, you can cheat and put your settings in
the machine.config file.
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
> I have a log component that gets information from config file and the factory
> create an instance of implementation that I wish. Now I need to use the log
[quoted text clipped - 7 lines]
>
> Mauricio
yst - 08 Nov 2006 18:05 GMT
Hi Mauricio
I had same problems with integration of log4net in COM+ applications.
I finally found a generic solution witch does not rely on the rootdir
setting for COM+ applications
You can use the construction string to set the config file location.
In order to use this method, you must:
- enable construction in com+ component
<ConstructionEnabled(True)> _
Public Class ComPlusServerApp
End Class
- Set the construct string for the COM+ component (can be set through
COM+ MMC)
The setting is on Component Level, not on the Application level
Set the construction string to something like: CONFIGFILE=<path to config>
Hope this helps
Yannik
Am 25.10.2006, 17:05 Uhr, schrieb Mauricio C Vidotto
<MauricioCVidotto@discussions.microsoft.com>:
> I have a log component that gets information from config file and the
> factory
[quoted text clipped - 13 lines]
>
> Mauricio