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 類別的新執行個體。 |