• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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