What it best location to store various configuration settings of a web site modules.
Creating class (that inherit ConfigurationSection) that map the settings in web.config file?
Or creating some DAL and BLL clases that work with database?
The bottom line is that if it's a large scale distributed environment, database is the way to go unless you have automated config file management system in place. Keep light-weight config files which rarely change for essentials such as environment-info service to retrieve connection strings or session parameters.
The Web. config file is in the root directory of an ASP.NET application. The Web. config file specifies configuration information that is specific to the application.
config file contains default and the machine-specific value for all supported settings. The machine settings are controlled by the system administrator and applications are generally not given access to this file. An application however, can override the default values by creating web. config files in its roots folder.
These config files are typically placed under separate root directory than the rest of application code. For example, in case of Java they are typically under src/main/resources .
I've used a simple heuristic to categorize each configuration variable into one of four categories:
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