Export (0) Print
Expand All

ScriptingRoleServiceSection Class

Represents the configuration section for role-service settings.

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

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

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

The role service is typically used to retrieve role information for the user who is logged on by using an asynchronous Web service call.

The following configuration file excerpt shows how to declaratively specify values for the Enabled property of the ScriptingRoleServiceSection class.

<system.web.extensions>
  <scripting>
    <webServices>
      <roleService enabled="true" />
    </webServices>
  </scripting>
</system.web.extensions>

The following example shows how to access the ScriptingRoleServiceSection element 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 role service section.
ScriptingRoleServiceSection roleSection =
    webServicesSection.RoleService;

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

Community Additions

ADD
Show:
© 2014 Microsoft