2.0 System.Configuration (.dll)

S

sloan

Can the new version of System.Configuration in 2.0 .. use config files
besides
app.config or web.config ?

Aka, is there an overload/constructor somewhere that takes a fileName ?


I've searched the documentation, but there are some many new classes in
there, I haven't found it.

...

Thanks.
..................
 
M

Michael Nemtsev

Hello sloan,

Nada, but why? config is just XML files, use System.Xml namespace to work
with them

s> Can the new version of System.Configuration in 2.0 .. use config
s> files
s> besides
s> app.config or web.config ?
s> Aka, is there an overload/constructor somewhere that takes a fileName
s> ?
s>
s> I've searched the documentation, but there are some many new classes
s> in there, I haven't found it.
s>
s> ..
s>
s> Thanks.
s> .................
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
S

sloan

Yeah, that's what I have going on now with some 1.1 code. (some custom code
to handle non default .config files)

I was figuring out whether or not that code needed to be brought forward in
2.0.....
 
J

Jay B. Harlow [MVP - Outlook]

sloan,
In both 1.x & 2.0 you can start a new AppDomain to get .NET to read config
files other then app.config or web.config. A bit "heavy handed" but it
works.


System.Configuration in 2.0 can use the configSource attribute on any
section in the app.config or web.config to allow putting that section in a
second (or third) config file.

http://msdn2.microsoft.com/en-us/library/system.configuration.sectioninformation.configsource.aspx


Using ConfigurationManager in .NET 2.0 has an OpenExeConfiguration method
that allows you to open "alternate" config sections. (by executable name).

http://msdn2.microsoft.com/en-us/library/ms224437.aspx

I'm looking at using OpenExeConfiguration to allow "config" applets to
modify a windows service's app.config file... (currently being down via
System.Xml).

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


| Can the new version of System.Configuration in 2.0 .. use config files
| besides
| app.config or web.config ?
|
| Aka, is there an overload/constructor somewhere that takes a fileName ?
|
|
| I've searched the documentation, but there are some many new classes in
| there, I haven't found it.
|
| ..
|
| Thanks.
| .................
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top