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 設定檔的元素。
匿名識別的目的是在機器層級和應用程式層級,為未認證的使用者指派一個獨特的身份。 這個獨特身份可用來追蹤使用者。 在此語境中使用的匿名身份與網路請求發出者的身份或與使用者相關的其他安全面向沒有任何關聯;它只是指派一個獨特的身份,用於追蹤和使用者狀態管理。
匿名使用者經常會被追蹤到識別 Session 碼。 此方法的主要問題在於識別碼非唯一性,以及儲存設定狀態值的資料開銷 Session ,必須如此才能指派會話識別碼給使用者。 匿名識別解決了這些問題,為每個未認證的使用者提供唯一識別碼,且不需使用者儲存任何資料來設定識別碼。
建構函式
| 名稱 | Description |
|---|---|
| AnonymousIdentificationSection() |
初始化 AnonymousIdentificationSection 類別的新執行個體。 |