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
- 継承
例
次の構成ファイルの抜粋は、 クラスの プロパティの値を宣言的に指定する Enabled 方法を ScriptingRoleServiceSection 示しています。
<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クラスを使用すると、ASP.NET で AJAX 機能をroleService
使用するための構成セクションの要素にプログラムでアクセスして変更できます。
ロール サービスは通常、非同期 Web サービス呼び出しを使用してログオンしているユーザーのロール情報を取得するために使用されます。
コンストラクター
ScriptingRoleServiceSection() |
ScriptingRoleServiceSection クラスの新しいインスタンスを初期化します。 |