Hierarchical Configuration Architecture
ASP.NET applies configuration settings to resources in a hierarchical manner. Web.config files supply configuration information to the directories in which they are located and to all child directories. The configuration settings for a Web resource are supplied by the configuration file located in the same directory as the resource and by all configuration files in all parent directories.
See Also
Configuration Inheritance | Configuration <location> Settings | ASP.NET Configuration | Configuring Applications