|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
2.0 System.Configuration (.dll)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. .................. 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 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..... Show quote "Michael Nemtsev" <nemt***@msn.com> wrote in message news:9cc1c863a74bc8c88ec48c9b0d57@msnews.microsoft.com... > 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 > > 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). -- Show quoteHope this helps Jay B. Harlow [MVP - Outlook] ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "sloan" <sl***@ipass.net> wrote in message news:O5qn5MIwGHA.1956@TK2MSFTNGP02.phx.gbl... | 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. | ................. | | |
|||||||||||||||||||||||