public static void GetAuthServiceSection() { // Get the Web application configuration. System.Configuration.Configuration configuration = WebConfigurationManager.OpenWebConfiguration("/aspnetTest"); // Get the external Web services section. ScriptingWebServicesSectionGroup webServicesSection = (ScriptingWebServicesSectionGroup)configuration.GetSectionGroup( "system.web.extensions/scripting/webServices"); // Get the authentication service section. ScriptingAuthenticationServiceSection authenticationSection = webServicesSection.AuthenticationService; }
private static void EnsureAuthenticationConfigLoaded() { // DevDiv 52730: drop the unnecessary double checked lock if (_authServiceEnabled == null) { ScriptingAuthenticationServiceSection authServicesSection = ScriptingAuthenticationServiceSection.GetConfigurationSection(); if (authServicesSection != null) { _authRequiresSSL = authServicesSection.RequireSSL; _authServiceEnabled = authServicesSection.Enabled; } else { _authServiceEnabled = false; } } }
public AuthenticationService() { _section = (ScriptingAuthenticationServiceSection)WebConfigurationManager.GetSection("system.web.extensions/scripting/webServices/authenticationService"); }