Groups | Blog | Home
all groups > dotnet distributed apps > october 2006 >

dotnet distributed apps : COM+ and Config Files



Mauricio C Vidotto
10/25/2006 8:05:03 AM
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

Bryan Phillips
10/27/2006 1:39:23 AM
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




[quoted text, click to view]
in message news:75F38D3B-5E59-4589-9A7C-3FDF13D31DD3@microsoft.com:

[quoted text, click to view]
yst
11/8/2006 7:05:19 PM
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=3D<path to con=
fig>

Hope this helps
Yannik

Am 25.10.2006, 17:05 Uhr, schrieb Mauricio C Vidotto =

<MauricioCVidotto@discussions.microsoft.com>:

[quoted text, click to view]
=

[quoted text, click to view]
e =

[quoted text, click to view]
e =

[quoted text, click to view]
=

[quoted text, click to view]
=

[quoted text, click to view]
AddThis Social Bookmark Button