コード例 #1
0
    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;
    }
コード例 #2
0
        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;
                }
            }
        }
コード例 #3
0
 public AuthenticationService()
 {
     _section = (ScriptingAuthenticationServiceSection)WebConfigurationManager.GetSection("system.web.extensions/scripting/webServices/authenticationService");
 }