ScriptingAuthenticationServiceSection Class

Represents the configuration section for authentication service settings. This class cannot be inherited.

Namespace:  System.Web.Configuration
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class ScriptingAuthenticationServiceSection : ConfigurationSection

The ScriptingAuthenticationServiceSection class enables you to programmatically access and modify the authenticationService element of the configuration section for using AJAX functionality in ASP.NET.

The authentication service for AJAX-enabled applications only works with forms-based authentication that uses cookies to exchange user information. For more information about Forms Authentication, see Using Forms Authentication with ASP.NET AJAX.

The following configuration file excerpt shows how to declaratively specify values for properties of the ScriptingAuthenticationServiceSection class.

<system.web.extensions>
  <scripting>
    <webServices>
      <authenticationService enabled="true" requireSSL="false" />
    </webServices>
  </scripting>
</system.web.extensions>

The following example demonstrates how to access ScriptingAuthenticationServiceSection programmatically.

// 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;

System.Object
  System.Configuration.ConfigurationElement
    System.Configuration.ConfigurationSection
      System.Web.Configuration.ScriptingAuthenticationServiceSection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft