• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

What is the best way for appliiction to reload app.config and parameters when app.config changes

I want my .net service application to detect when the app.config file has changed and reload the settings. My settings are in the 'applicationSettings' of the app.config.
0
lsassano
Asked:
lsassano
  • 2
  • 2
1 Solution
 
lsassanoAuthor Commented:
zvytas,

Thanks for you quick reply.  I have a few details to ask though.
Is wiring the filesystemwatcher events to the app.config enough or are there other factors to consiider ie caching. When handling the changed event would the properties in the applicationSettings be able to be read lets say in Settings.Default.<settings name>?

Do you have any code snippets directly pertaining to app.config file?

thanks
0
 
käµfm³d 👽Commented:
I want my .net service application
Web service or windows service?
0
 
zvytasCommented:
Caching will not occur, so that's not a problem. Read your config file as normal (i.e. you the same code you used to read the config when service starts).
0
 
lsassanoAuthor Commented:
My application is a windows service
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now