Home All Groups Group Topic Archive Search About

ConfigurationManager headache

Author
19 Mar 2006 11:23 PM
Mowie_X
Hi there,

I am trying to share connection strings amongst multiple console
applications in the new 2.0 environment.

I see that there is the new ConfigurationManager.ConnectionStrings to
handle this, which requires <connectionStrings> .. </connectionStrings>
element.

However, I don't see any way for console applications to "share" a
configuration file.  For instance, in the app.config for each app I
would like to do the following:

<connectionStrings file="path\tosharedconfig.config">
...
</connectionStrings>

and then declare the shared stuff in toshareconfig.config.  What would
be the best solution for this?  This works with "appSettings" section,
but for some reason not with other sections.  I get a warning "the file
attribute is not declared" when I try this for the connectionString
stuff.

AddThis Social Bookmark Button