ScriptingRoleServiceSection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示角色服務設定的組態區段。
public ref class ScriptingRoleServiceSection sealed : System::Configuration::ConfigurationSection
public sealed class ScriptingRoleServiceSection : System.Configuration.ConfigurationSection
type ScriptingRoleServiceSection = class
inherit ConfigurationSection
Public NotInheritable Class ScriptingRoleServiceSection
Inherits ConfigurationSection
- 繼承
範例
下列組態檔摘要說明如何以宣告方式指定 類別之 ScriptingRoleServiceSection 屬性的值Enabled。
<system.web.extensions>
<scripting>
<webServices>
<roleService enabled="true" />
</webServices>
</scripting>
</system.web.extensions>
下列範例示範如何以程序設計方式存取 ScriptingRoleServiceSection 專案。
// 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;
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration("/aspnetTest")
' Get the external Web services section.
Dim webServicesSection As ScriptingWebServicesSectionGroup = _
CType(configuration.GetSectionGroup( _
"system.web.extensions/scripting/webServices"), ScriptingWebServicesSectionGroup)
' Get the role service section.
Dim roleSection _
As ScriptingRoleServiceSection = _
webServicesSection.RoleService
備註
類別 ScriptingRoleServiceSection 可讓您以程式設計方式存取和修改 roleService 組態區段的 元素,以在 ASP.NET 中使用 AJAX 功能。
角色服務通常用來擷取使用異步 Web 服務呼叫登入之使用者的角色資訊。
建構函式
| ScriptingRoleServiceSection() |
初始化 ScriptingRoleServiceSection 類別的新執行個體。 |