Normally, I would store all application configuration data in the web/app.config and associated xml configuration files. But I was thinking that maybe this wasn’t necessarily the best way of handling all config data.
Are there any suggestions as to when it might be more practical to use one or the other?
I do not have a clear-cut rule, but my “rule of thumb” is to store locally only the configuration that is specific to the computer on which the program runs, and store all shared configuration data in a database.
We developed a small library for storing and editing/versioning our configuration in a database. We also designed a shared configuration store with separate areas for each application, and an ability to reuse config entries in multiple applications. We store high-level configuration entries, such as rules, query definitions, etc. in the database.
The location-specific configuration, such as locations of plugin assemblies, connection string for the DB-based configuration library, logging settings, etc. go into the “regular” web/app.config files. This lets us keep a relatively clean separation of local vs. shared configuration.