WebConfigurationManger知道如何处理Web应用程序中的配置继承。如您所知,在一个应用程序中可能有多个web.config文件-
一个在站点的根目录中,而在子目录中则是任意数量。您可以将路径传递到GetSection()方法以获取可能的覆盖配置。
如果我们用Reflector看一下WebConfigurationManager,那么事情就很清楚了:
public static object GetSection(string sectionName){ ... return ConfigurationManager.GetSection(sectionName);}public static object GetSection(string sectionName, string path){ ... return HttpConfigurationSystem.GetSection(sectionName, path);}


