I'd like to use the configSource attribute of my web config section to define external files for various settings.
Particularly, the appSettings section. This means my config file has the following entry:
<appSettings configSource="My.AppSettings.config" />
However, if this file is updated, the settings are not automatically picked up, which would have been the case if the settings were manually included in the web.config
Further investigation lead me to the restartOnExternalChanges attribute. This can apparently be used with <section/>
elements to define whether externals files identified by configSource can trigger restarts or not. Great! or so I thought.
However, when trying to define the appSettings section, and changing the restartOnExternalChanges value, I see the same error encountered here, because the appSettings section is defined in the machine.config - a file I cannot change.
Does anyone know if its possible to get these two settings to work together, for sections already defined at a higher-level?
Try this configuration instead.
<section
name="MyAppSettings"
type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
restartOnExternalChanges="true"
requirePermission="false" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With