I’ve got an ASP.Net app in which my AppSettings node from the Web.Config xml is stored in a separate file.
So my Web.Config contains this:
<appSettings file="AppSettings.config" />
Whenever I change a setting in there I have to do an iisreset to force the changes to kick in. In other words, my changes in this file aren’t detected the same way changes to the Web.Config is.
Does anyone know how I can make these changes take effect automatically, like it does with the Web.Config?
Thanks!
Edit: In response to other answers. You can change the machine.config to include the restartOnExternalChanges=”true” option for appSettings; however, this will cause ALL of your web applications to restart when you touch any of the external app settings files. (Also, I think this may only work when you use configSource=”file.name” not file=”file.name”.)
This is by design and the only way to cause the application to reset is manually or via a script.
You can take a look here for a script which will reset your application without restarting iis:
http://weblogs.asp.net/jgalloway/archive/2006/06/01/Avoid-IISRESET-in-ASP.NET-applications-_2800_added-bonus_3A00_-ASPRESET_2900_.aspx