473,498 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Config File for COM+

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
6 3624
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2978
by: Maxim Khesin | last post by:
I want to have a config file with my python proggie, satisfying the following requirements: 1) support key->(value, default) 2) simple and intuitive to read and edit 3) easyly readable into a...
3
1747
by: david | last post by:
I found my web.config file always in lock mode, when I tried to modify it, I ofter got "Can not create web.config" error. I had to reboot my machine, and before I accessed any site I can modify it....
2
933
by: Suresh Gladstone | last post by:
Hi, This is a bit with versioning and installation of the .NET dlls. I want to perform the following, 1. A third party application will be invoking my .NET dll through COM interop . For this I...
16
1963
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how...
6
2255
by: Rich | last post by:
Hello, I picked up this example on using the Reflection namespace for loading forms/classes on the fly at msdn http://msdn.microsoft.com/library/default.asp?...
13
507
by: Khodr | last post by:
Hello, I am using VS.NET 2003 and vb. I build my application MyApp and it generates MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config. Great and no problem! I need to...
17
3221
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
11
3420
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand...
12
13406
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
5
7807
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
0
7005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.