We have an IIS based application with different web apps, some third party components and several services.
Server1
- AppPool1
- App1
- AppPool2
- Third party app
- AppPool1
Server2
- AppPool3
- Third party app 2
- App2
- Windows Service
- CLR Stored Proc
- AppPool3
The goal is to put all environment relevant settings (such as connection strings, URLS, etc.) into a single configuration file per environment (dev., test, integration, production). The application relevant stuff should be based on this 'global' settings file and individual settings files per application.
I have to use the built-in static System.Configuration.ConfigurationManager
class because some third party tools depend on it.
I know of the following possible approaches using System.Configuration.ConfigurationManager
:
- Individual files (current, redundant approach)
- Machine.config (too global)
- Hierarchical configuration in IIS (doesn't affect Service and CLR Proc)
Edit:
The linkedConfiguration
element only affects loader binding policies.
Are there other methods? Which one is best?