Configuration Recommendations

I am interested to learn about some best practices when saving configuration settings. Let's say you have a few settings that you can use for multiple applications. I have heard both good and bad ways of storing these types of settings that need to be shared (XML files).

Just wondering what is a good standard in terms of maintaining application settings in assemblies to simplify deployment.

I guess I look at this from two scenarios:

  • An application within the company (be it a large .com or a small application for the administrator).
  • When creating an API for use by other users, how to refer to configuration parameters when you do not know what final values ​​will be received from the consumer who will use your API in his application.

Added-1:

Thanks. I have heard horrible stories in which some places control the configuration settings of several applications. I am not a collector, so I don’t know why, but I want to definitely try to make sure that I understand this now in terms of web.config and custom configuration files, etc. Types of scripts.

Added-2:

, API . , , , () , API ( , #/. NET)? , , , "ApplicationDefinitions"?

+5
3

( ) machine.config.

, web.config -/.

+1

UAT (User Acceptance Tests), , .

LDAP.

ANT, Jakarta-Velocity . (UAT, DEV, PROD, DR) .

, . , UAT/DEV.. .., .

, 8 . , , . .

+1

, , - , , , , ...

If you code in .Net, then settings that are common to several applications can be saved in machine.config ... again, do not put them directly in machine.config, but create a link to a separate file (using the configSection custom attribute and configSource = "" to create an indirect link to this separate file ...

0
source

All Articles