ScriptingProfileServiceSection 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示配置文件服务设置的配置节。 此类不能被继承。
public ref class ScriptingProfileServiceSection sealed : System::Configuration::ConfigurationSection
public sealed class ScriptingProfileServiceSection : System.Configuration.ConfigurationSection
type ScriptingProfileServiceSection = class
inherit ConfigurationSection
Public NotInheritable Class ScriptingProfileServiceSection
Inherits ConfigurationSection
- 继承
示例
以下示例演示如何以声明方式为配置文件中的 类的属性 ScriptingProfileServiceSection 指定值。
<system.web.extensions>
<scripting>
<webServices>
<profileService enabled="true"
readAccessProperties="FirstName,LastName"
writeAccessProperties="FirstName,LastName" />
</webServices>
</scripting>
</system.web.extensions>
以下示例演示如何以编程方式访问 ScriptingProfileServiceSection 节。
// 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 profile service section.
ScriptingProfileServiceSection profileSection =
webServicesSection.ProfileService;
' 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 profile service section.
Dim profileSection _
As ScriptingProfileServiceSection = _
webServicesSection.ProfileService
注解
类 ScriptingProfileServiceSection 使你能够以编程方式访问和修改 profileService
使用 AJAX 功能的 ASP.NET 应用程序的配置节的 元素。
配置文件服务用于获取和设置与当前请求关联的用户标识的配置文件属性。 这意味着配置文件服务适用于经过身份验证的用户。 当匿名标识功能启用 (或配置文件中的可用) 时,它也适用于匿名用户。
构造函数
ScriptingProfileServiceSection() |
初始化 ScriptingProfileServiceSection 类的新实例。 |