Problem wiyh Application Configuration

  • Thread starter Thread starter Mevar
  • Start date Start date
M

Mevar

Hello to everybody.I have a problem.I'm using an
application configuration file to store particular
settings.I use a custom Section Handler to read settings
and everything work fine if I read my settings.If I add
some settings to the file and I read the configuration
file again I can see only the previous setting.To read
the setting added I must exit from the application and
run it again.Anyone know why it happens?I've read that
configuration file are read from the CLR when running the
application.Is this the problem,so any modify can't be
read at run time?Thank you
 
Hi Mevar,

I think that that is the it works, I haven't check the code with ildasm but
I think that ConfigurationSettings class has a private static constructor
that read the config file before its used, and after that is not readed
again.

If you want to be able to monitoring a config file you will have to
implement it by your own ( I do that , so if you need some code let me
know ) basically all you need is a FileSystemWatcher to your config file and
a class to read and parse the XML file.

Hope this help,
 
Back
Top