AnonymousIdentificationSection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定未驗證之使用者的匿名識別。 此類別無法獲得繼承。
public ref class AnonymousIdentificationSection sealed : System::Configuration::ConfigurationSection
public sealed class AnonymousIdentificationSection : System.Configuration.ConfigurationSection
type AnonymousIdentificationSection = class
inherit ConfigurationSection
Public NotInheritable Class AnonymousIdentificationSection
Inherits ConfigurationSection
- 繼承
範例
下列範例示範如何從基礎組態檔取得 AnonymousIdentificationSection 物件。 您可以使用這個物件來取得或設定相關的組態值。
// Get the applicaqtion configuration.
Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the section.
AnonymousIdentificationSection anonymousIdentificationSection =
(AnonymousIdentificationSection)configuration.GetSection(
"system.web/anonymousIdentification");
' Get the applicaqtion configuration.
Dim configuration _
As Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim anonymousIdentificationSection _
As AnonymousIdentificationSection = _
CType(configuration.GetSection( _
"system.web/anonymousIdentification"), _
AnonymousIdentificationSection)
備註
類別 AnonymousIdentificationSection 可讓您以程式設計方式存取和修改 anonymousIdentification 組態檔的 元素。
匿名識別的目的是要將計算機和應用層級的唯一身分識別指派給未驗證的使用者。 然後,您可以使用這個唯一身分識別來追蹤使用者。 在此內容中使用的匿名識別與 Web 要求簽發者的身分識別,或與使用者相關的其他安全性層面沒有任何關聯性;它只會針對追蹤目的和用戶狀態管理指派唯一的身分識別。
匿名使用者通常會使用 Session 標識碼來追蹤。 此方法的主要問題是標識碼的非唯一 Session 性,以及儲存數據以設定狀態值時所牽涉到的額外負荷,必須完成此作業,才能將會話標識符指派給使用者。 匿名識別可藉由為每個未驗證的使用者提供唯一標識符,而不需要使用者儲存任何數據來設定標識符,來解決這些問題。
建構函式
| AnonymousIdentificationSection() |
初始化 AnonymousIdentificationSection 類別的新執行個體。 |