Accessing Configuration Settings
From Logic Wiki
Use the ConfigurationManager from System.Configuration
var server = ConfigurationManager.AppSettings["FileServerName];
var modulesSection = ConfigurationManager.GetSection("system.web/httpModules") as HttpModulesSection;
var installedModules = modulesSection.Modules.Count;
Configuration Hierarchy
Each application inherits settings from higher level config files
- Machine.config
- Machine web.config
- Parent's web.config
- your web.config
Check : Web Config Transform