|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windows Service and App.Config problemI have a windows service that has an app config file. I also have a
filesystem watcher watching the config file. When the config file changes I am reading the values back into memory. It all appears to work but the values coming back from the app.config are always the same until i stop and restart the service. Aparently the file is being cached. I am using the file that is installed with my service and i'm sure my event is firing from the filesystem watcher because it's writing a message i created to the event log. I am reading the values from my app.confg file with System.Configuration.ConfigurationSettings.AppSettings(cParameter) Any ideas why this does not see the new values of my file and how I can get around this problem? Thanks in advance. Tommy,
You are right, config file setting does get cached! Only time they will be updated again is if you restart the service. For this reason you can not use ConfigurationSettings.AppSettings! But you can have some global variables that gets updated from watcher. I hope this helps. JK
Label control questions; avoiding cut-off text
Color theme of toolstrip and menustrip IRDA with VB2005 VB2005 - Bound Date TextBox Issues DirectCast - Why is this not working? dropdownlist --> URL Inserting an image file in a datagrid view column- how How to check Excel version number with .net? AutoIdent Woking with IntPtr, how can I copy with offset? |
|||||||||||||||||||||||