Another .config file

  • Thread starter Thread starter Pietro
  • Start date Start date
P

Pietro

I've created another .config file (site.config) to avoid restarting when
web.config is changed, but changes in this new .config file only take effect
when the application restarts. I would like to know how to view this changes
or restart it manually.

Thanks
Pietro
 
Pietro said:
I've created another .config file (site.config) to avoid restarting
when web.config is changed, but changes in this new .config file only
take effect when the application restarts. I would like to know how
to view this changes or restart it manually.

Thanks
Pietro

Based on your description you don't reread the file every time you need
a value (good!), so you store it somewhere. Are you storing it in Application?
Try using Cache instead, there you can attach a "filewatcher", that will remove
the cached item if the file changes.
You will want a utility function to access the cached file: if it's in the Cache
use that, else read the file and store it (again).

Hans Kesting
 
Back
Top