You will still need web .config, as there are configuration elements that are web content that are not in the app.config of your service. As Mark says , using the ConfigSource attribute will allow you to share common elements.
Note that the appSettings element has a slight difference: the File attribute.
Specifies the relative path to an external file that contains user application configuration settings. The specified file contains the same settings that are specified in the appSettings attributes for adding, cleaning, and deleting and uses the same key / value pair format as these elements.
This behaves differently with respect to the ConfigSource attribute, because you do not need to replace the entire section with an external file, it can contain only the elements you want to add or override the values:
You can use the file attribute to specify a configuration file that provides additional parameters or overrides the parameters specified in the appSettings element.
If you use ConfigSource to exchange other elements, you will still have automatic application reloads when changing values ββ- the note about the restartOnExternalChanges attribute should be ignored for ASP.NET applications, however, using the File attribute means that the changes will not lead to a restart.
The contents of external files must be cached, so performance should not be affected.
Zhaph - Ben Duguid
source share