.NET Framework Class Library
AnonymousIdentificationSection Class

Configures anonymous identification for users that are not authenticated. This class cannot be inherited.

Inheritance Hierarchy
SystemObject
   System.ConfigurationConfigurationElement
     System.ConfigurationConfigurationSection
      System.Web.ConfigurationAnonymousIdentificationSection

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)
Syntax
Public NotInheritable Class AnonymousIdentificationSection _
	Inherits [%$TOPIC/ttkhcyec_en-us_VS_110_2_0_0_0_0%]
public sealed class AnonymousIdentificationSection : [%$TOPIC/ttkhcyec_en-us_VS_110_2_0_1_0_0%]
public ref class AnonymousIdentificationSection sealed : public [%$TOPIC/ttkhcyec_en-us_VS_110_2_0_2_0_0%]
[<[%$TOPIC/ttkhcyec_en-us_VS_110_2_0_3_0_0%]>]
type AnonymousIdentificationSection =  
    class 
        inherit [%$TOPIC/ttkhcyec_en-us_VS_110_2_0_3_0_1%] 
    end

The AnonymousIdentificationSection type exposes the following members.

Constructors
  NameDescription
Public method AnonymousIdentificationSectionInfrastructure. Initializes a new instance of the AnonymousIdentificationSection class.
Top
Properties
  NameDescription
Public property CookielessGets or sets a value indicating whether to use cookies.
Public property CookieNameGets or sets the cookie name.
Public property CookiePathGets or sets the path where the cookie is stored.
Public property CookieProtectionGets or sets the encryption type used to encrypt the cookie.
Public property CookieRequireSSLGets or sets a value indicating whether a Secure Sockets Layer (SSL) connection is required when transmitting authentication information.
Public property CookieSlidingExpirationGets or sets whether the cookie time-out value is reset on each request.
Public property CookieTimeoutGets or sets the amount of time, in minutes, after which the authentication expires.
Public property CurrentConfigurationGets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to. (Inherited from ConfigurationElement.)
Public property DomainGets or sets the cookie domain.
Public property ElementInformationGets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object. (Inherited from ConfigurationElement.)
Protected property ElementPropertyGets the ConfigurationElementProperty object that represents the ConfigurationElement object itself. (Inherited from ConfigurationElement.)
Public property EnabledGets or sets a value indicating whether anonymous identification is enabled.
Protected property ItemConfigurationPropertyGets or sets a property or attribute of this configuration element. (Inherited from ConfigurationElement.)
Protected property ItemStringGets or sets a property, attribute, or child element of this configuration element. (Inherited from ConfigurationElement.)
Public property LockAllAttributesExceptGets the collection of locked attributes. (Inherited from ConfigurationElement.)
Public property LockAllElementsExceptGets the collection of locked elements. (Inherited from ConfigurationElement.)
Public property LockAttributesGets the collection of locked attributes (Inherited from ConfigurationElement.)
Public property LockElementsGets the collection of locked elements. (Inherited from ConfigurationElement.)
Public property LockItemGets or sets a value indicating whether the element is locked. (Inherited from ConfigurationElement.)
Protected property PropertiesGets the collection of properties. (Inherited from ConfigurationElement.)
Public property SectionInformationGets a SectionInformation object that contains the non-customizable information and functionality of the ConfigurationSection object. (Inherited from ConfigurationSection.)
Top
Methods
  NameDescription
Protected method DeserializeElementReads XML from the configuration file. (Inherited from ConfigurationElement.)
Protected method DeserializeSectionInfrastructure. Reads XML from the configuration file. (Inherited from ConfigurationSection.)
Public method EqualsCompares the current ConfigurationElement instance to the specified object. (Inherited from ConfigurationElement.)
Public method GetHashCodeGets a unique value representing the current ConfigurationElement instance. (Inherited from ConfigurationElement.)
Protected method GetRuntimeObjectReturns a custom object when overridden in a derived class. (Inherited from ConfigurationSection.)
Public method GetTypeGets the Type of the current instance. (Inherited from Object.)
Protected method InitSets the ConfigurationElement object to its initial state. (Inherited from ConfigurationElement.)
Protected method InitializeDefaultUsed to initialize a default set of values for the ConfigurationElement object. (Inherited from ConfigurationElement.)
Protected method IsModifiedIndicates whether this configuration element has been modified since it was last saved or loaded when implemented in a derived class. (Inherited from ConfigurationSection.)
Public method IsReadOnlyGets a value indicating whether the ConfigurationElement object is read-only. (Inherited from ConfigurationElement.)
Protected method ResetResets the internal state of the ConfigurationElement object, including the locks and the properties collections. (Inherited from ConfigurationElement.)
Protected method ResetModifiedResets the value of the IsModified method to false when implemented in a derived class. (Inherited from ConfigurationSection.)
Protected method SerializeElementWrites the contents of this configuration element to the configuration file when implemented in a derived class. (Inherited from ConfigurationElement.)
Protected method SerializeSectionInfrastructure. Creates an XML string containing an unmerged view of the ConfigurationSection object as a single section to write to a file. (Inherited from ConfigurationSection.)
Protected method SerializeToXmlElementWrites the outer tags of this configuration element to the configuration file when implemented in a derived class. (Inherited from ConfigurationElement.)
Protected method SetReadOnlySets the IsReadOnly property for the ConfigurationElement object and all subelements. (Inherited from ConfigurationElement.)
Protected method ShouldSerializeElementInTargetVersionIndicates whether the specified element should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework. (Inherited from ConfigurationSection.)
Protected method ShouldSerializePropertyInTargetVersionIndicates whether the specified property should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework. (Inherited from ConfigurationSection.)
Protected method ShouldSerializeSectionInTargetVersionIndicates whether the current ConfigurationSection instance should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework. (Inherited from ConfigurationSection.)
Public method ToStringReturns a string that represents the current object. (Inherited from Object.)
Protected method UnmergeModifies the ConfigurationElement object to remove all values that should not be saved. (Inherited from ConfigurationElement.)
Top
Remarks

The AnonymousIdentificationSection class allows you to programmatically access and modify the anonymousIdentification element of a configuration file.

The purpose of anonymous identification is to assign, at machine and application level, a unique identity to a non-authenticated user. This unique identity can then be used to track the user. Anonymous identification as used in this context does not have any relationship with the identity of the issuer of the Web request or with other security aspects related to the user; it simply assigns a unique identity for tracking purposes and user state management.

Anonymous users are often tracked using the Session identifier. The main problems with this approach are the non-uniqueness of the identifier and the overhead involved in storing data to set a Session state value, which must be done in order to assign a session identifier to a user. Anonymous identification resolves these problems by providing a unique identifier for each non-authenticated user and not requiring the user to store any data to set the identifier.

Examples

The following example shows how to obtain the AnonymousIdentificationSection object from the underlying configuration file. You use this object to get or set the related configuration values.

' 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)
// Get the applicaqtion configuration.
Configuration configuration =
    WebConfigurationManager.OpenWebConfiguration(
   "/aspnetTest");

// Get the section.
AnonymousIdentificationSection anonymousIdentificationSection = 
    (AnonymousIdentificationSection)configuration.GetSection(
    "system.web/anonymousIdentification");
Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.