private static void EnsureSectionLoaded() { if (!s_sectionLoaded) { ScriptingScriptResourceHandlerSection section = (ScriptingScriptResourceHandlerSection) WebConfigurationManager.GetWebApplicationSection("system.web.extensions/scripting/scriptResourceHandler"); if (section != null) { s_enableCaching = section.EnableCaching; s_enableCompression = section.EnableCompression; } else { s_enableCaching = (bool)_propEnableCaching.DefaultValue; s_enableCompression = (bool)_propEnableCompression.DefaultValue; } s_sectionLoaded = true; } }
public object GetConfig(string sectionName) { object o = WebConfigurationManager.GetWebApplicationSection(sectionName); if (o == null || o is IgnoreSection) { /* this can happen when the section * handler doesn't subclass from * ConfigurationSection. let's be * nice and try to load it using the * 1.x style routines in case there's * a 1.x section handler registered * for it. */ object o1 = WebConfigurationManager.oldConfig.GetConfig(sectionName); if (o1 != null) { return(o1); } } return(o); }
internal static ScriptingAuthenticationServiceSection GetConfigurationSection() { return((ScriptingAuthenticationServiceSection)WebConfigurationManager.GetWebApplicationSection("system.web.extensions/scripting/webServices/authenticationService")); }