-1

Is it posible to re-cache app.config? for example after changing some fields in app.config do not restart application.

Thanks.

hovkar
  • 1,381
  • 3
  • 14
  • 22

2 Answers2

2

Have a look at this answer: Change connection string & reload app.config at run time

Community
  • 1
  • 1
Simeon
  • 5,519
  • 3
  • 29
  • 51
0

You can refresh certain sections of the configuration file using the ConfigurationManager class so the next time that section needs to be read, it's pulled from disk.

http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.refreshsection%28VS.80%29.aspx

Andy Shellam
  • 15,403
  • 1
  • 27
  • 41