Com+ server and config file - how to deploy together ?

  • Thread starter Thread starter Gawelek
  • Start date Start date
G

Gawelek

In order to deploy my server I do the following :

regsvcs /fc MyServer.dll
gacutil /i MyServer.dll

.... and I don't have to know where actually my dll is placed.
It is advantage of GAC. But I want to place config file in the same
location, how I can do it, any ideas ?

Gawel
 
Hi

Hi

App.config is applicable only to Applications(.exe). So
even if a function in ur dll reads a key from the
configfile using configurationsettings.appsettings.Get,
the file referred to will be app.config of the executable
which instantiated a class in the dll.

So even if you know the location of the dll it wont make
any difference as the entry should be in the config file
of the calling appliation. right!!!


However in case your launching process is dllhost, you can
create a dllhost.exe.config file in c:\winnt\system32 and
add the entry to it and try!!!

hth

regards,

sr
 
App.config is applicable only to Applications(.exe). So
even if a function in ur dll reads a key from the
configfile using configurationsettings.appsettings.Get,
the file referred to will be app.config of the executable
which instantiated a class in the dll.

So even if you know the location of the dll it wont make
any difference as the entry should be in the config file
of the calling appliation. right!!!


However in case your launching process is dllhost, you can
create a dllhost.exe.config file in c:\winnt\system32 and
add the entry to it and try!!!

Thanx, but

I can use System.Reflection.Assembly.GetExecutingAssembly()
in order to get to know the path to my dll. And If I can deploy together
dll + config(can be ordinary txt file) then I can use this path to find my
config file. Therefore I am looking for a mechanism which placed both
in the same directory and during deployment I don't have to know
this directory.


Gawel
 
Back
Top