AnonymousIdentificationModule Class
Manages anonymous identifiers for the ASP.NET application.
Assembly: System.Web (in System.Web.dll)
The AnonymousIdentificationModule type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AnonymousIdentificationModule | Creates an instance of the AnonymousIdentificationModule class. |
| Name | Description | |
|---|---|---|
![]() ![]() | ClearAnonymousIdentifier | Clears the anonymous cookie or identifier associated with a session. |
![]() | Dispose | Releases all resources, other than memory, used by the AnonymousIdentificationModule. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | Init | Initializes the AnonymousIdentificationModule object. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The AnonymousIdentificationModule class creates and manages anonymous identifiers for an ASP.NET application. Anonymous identifiers are used by features that support anonymous identification such as the ASP.NET System.Web.Profile.
The AnonymousIdentificationModule exposes a Creating event that enables you to set the anonymous identifier to a custom value. If you do not specify a custom anonymous identifier value, a Guid is used.
The Creating event is accessed by specifying a subroutine named AnonymousIdentification_Creating in the Global.asax file for your ASP.NET application.
The AnonymousIdentificationModule is only used when anonymous identification is Enabled by setting the enabled attribute of the anonymousIdentification configuration element to true.
Note |
|---|
Anonymous identification is independent of any type of ASP.NET authentication. |
The following code example shows a Web.config file for an application that enables anonymous identification.
<configuration>
<system.web>
<authentication mode="Forms" >
<forms loginUrl="login.aspx" name=".ASPXFORMSAUTH" />
</authentication>
<anonymousIdentification enabled="true" />
<profile defaultProvider="AspNetSqlProvider">
<properties>
<add name="ZipCode" allowAnonymous="true" />
<add name="CityAndState" allowAnonymous="true" />
<add name="StockSymbols" type="System.Collections.ArrayList"
allowAnonymous="true" />
</properties>
</profile>
</system.web>
</configuration>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
