By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,104 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,104 IT Pros & Developers. It's quick & easy.

Config File for COM+

P: n/a
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I can
store its Config File and what should I name it?
this COM+ Component calls a WebSvc too! the IDE Created an app.config for me
in the project workspace but somehow that isn't working....

TIA
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
The config file should be web.config for ASP.NET and
<<exename>>.config for other EXEs.

BTW, the config file thing is .NET only. I am wondering if you wrote a COM+
component using unmanaged code, then this might not work.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
-------------------------------------------------------------------------------------------

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
can
store its Config File and what should I name it?
this COM+ Component calls a WebSvc too! the IDE Created an app.config for
me
in the project workspace but somehow that isn't working....

TIA

Nov 17 '05 #2

P: n/a
I have written Serviced Component and need an XML Config for it as it calls
a WS whose WSDL changes frequently
and due to other reasons too, we need Config

TIA
"Sahil Malik [MVP]" <co*****************@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The config file should be web.config for ASP.NET and
<<exename>>.config for other EXEs.

BTW, the config file thing is .NET only. I am wondering if you wrote a COM+ component using unmanaged code, then this might not work.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
-------------------------------------------------------------------------- -----------------
"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
can
store its Config File and what should I name it?
this COM+ Component calls a WebSvc too! the IDE Created an app.config for me
in the project workspace but somehow that isn't working....

TIA


Nov 17 '05 #3

P: n/a
Vai2000,

You should be able to name it the name of the assembly that is the entry
point with an xml extension, and it should work (assuming that this is an
out of process component).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Vai2000" <no****@microsoft.com> wrote in message
news:O6**************@TK2MSFTNGP15.phx.gbl...
I have written Serviced Component and need an XML Config for it as it calls
a WS whose WSDL changes frequently
and due to other reasons too, we need Config

TIA
"Sahil Malik [MVP]" <co*****************@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The config file should be web.config for ASP.NET and
<<exename>>.config for other EXEs.

BTW, the config file thing is .NET only. I am wondering if you wrote a

COM+
component using unmanaged code, then this might not work.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
--------------------------------------------------------------------------

-----------------

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> Hi All, I have created a COM+ Component Foo.dll, I was wondering where
> I
> can
> store its Config File and what should I name it?
> this COM+ Component calls a WebSvc too! the IDE Created an app.config for > me
> in the project workspace but somehow that isn't working....
>
> TIA
>
>



Nov 17 '05 #4

P: n/a
Well I tried creating foo.dll.config and dllhost.exe.config
but they aren't working. :(
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O8*************@TK2MSFTNGP15.phx.gbl...
Vai2000,

You should be able to name it the name of the assembly that is the entry point with an xml extension, and it should work (assuming that this is an
out of process component).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Vai2000" <no****@microsoft.com> wrote in message
news:O6**************@TK2MSFTNGP15.phx.gbl...
I have written Serviced Component and need an XML Config for it as it calls a WS whose WSDL changes frequently
and due to other reasons too, we need Config

TIA
"Sahil Malik [MVP]" <co*****************@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The config file should be web.config for ASP.NET and
<<exename>>.config for other EXEs.

BTW, the config file thing is .NET only. I am wondering if you wrote a

COM+
component using unmanaged code, then this might not work.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
-------------------------------------------------------------------------

- -----------------

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> Hi All, I have created a COM+ Component Foo.dll, I was wondering where > I
> can
> store its Config File and what should I name it?
> this COM+ Component calls a WebSvc too! the IDE Created an app.config

for
> me
> in the project workspace but somehow that isn't working....
>
> TIA
>
>



Nov 17 '05 #5

P: n/a
If it's a "library" type component, it's up to the calling EXE to read the
config file.
For a "server" type application it's not that easy. This is because the host
process is Dllhost.exe which can't/doesn't have a config file, all Server
types share the same host Dllhost.exe, you don't want your config file to be
used by all dllhosts.exe don't you?
Now what you could do is the following:
1. Set the application root of your COM+ application to a specific
directory, any directory will do, just make them different for each
application.
2. Create an application manifest file in this directory, name it
'application.manifest'. This file is just a normal manifest that describes
the dependencies. Note that this can be as simple as...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
</assembly>
3 Add your normal config file to this same directory and rename it as
'application.config'
With this in place your COM+ server type application can access its own
config info through the normal API's.

Willy.

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
can
store its Config File and what should I name it?
this COM+ Component calls a WebSvc too! the IDE Created an app.config for
me
in the project workspace but somehow that isn't working....

TIA

Nov 17 '05 #6

P: n/a
Great, thanks, that sounds convincing

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
If it's a "library" type component, it's up to the calling EXE to read the
config file.
For a "server" type application it's not that easy. This is because the host process is Dllhost.exe which can't/doesn't have a config file, all Server
types share the same host Dllhost.exe, you don't want your config file to be used by all dllhosts.exe don't you?
Now what you could do is the following:
1. Set the application root of your COM+ application to a specific
directory, any directory will do, just make them different for each
application.
2. Create an application manifest file in this directory, name it
'application.manifest'. This file is just a normal manifest that describes
the dependencies. Note that this can be as simple as...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
</assembly>
3 Add your normal config file to this same directory and rename it as
'application.config'
With this in place your COM+ server type application can access its own
config info through the normal API's.

Willy.

"Vai2000" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I
can
store its Config File and what should I name it?
this COM+ Component calls a WebSvc too! the IDE Created an app.config for me
in the project workspace but somehow that isn't working....

TIA


Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.