The overload of the OpenExeConfigur ation method that you mentioned is the one
that I am using.
Here is what I did yesterday evening. In order to get something to work
quickly, I downloaded the sample application from the current issue of MSDN
magazine (about configuration files). I replaced the line of code
config =
ConfigurationMa nager.OpenExeCo nfiguration(Con figurationUserL evel.None)
with
config = ConfigurationMa nager.OpenExeCo nfiguration("d: \test.config")
I have a file named test.config with the exact same contents as the
app.config in the application located a "d:\test.config ". When I run the
application, the custom sections are ignored. When I run the application
with the original line of code, the custom sections are processed.
Is there something I am doing wrong with this?
Thank you,
Jason Richmeier
"Greg Young" wrote:
For any app domains that you create you can use
AppDomainSetup. ConfigurationFi le but since you do not control the creation
of your default application domain you cannot change the name. A thought
might be that you could spawn off a secondary domain from the main domain
(changing the name of the config)
Another idea would be to use ConfigurationMa nager.OpenExeCo nfiguration(fil e)
http://msdn2.microsoft.com/en-us/library/ms224437.aspx which would return
you a seperate Configuration object for the file.
Cheers,
Greg Young
MVP - C#
"Jason Richmeier" <js*@noemail.no email> wrote in message
news:02******** *************** ***********@mic rosoft.com... Is it possible to create a custom configuration file (other than
app.config)
that can be processed by classes in the System.Configur ation namespace?
I have seen a ton of articles that talk about custom sections (inside the
app.config file) but I would like to make an entirely new config file. I
opened a custom config file with the ConfigurationMa nager class but it
seemd
as if it ignored all of the content in the config file.
Is there any decent documentation that covers this topic?
Thank you,
Jason Richmeier