Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

AnonymousIdentificationModule Class

Manages anonymous identifiers for the ASP.NET application.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
public sealed class AnonymousIdentificationModule : IHttpModule
public final class AnonymousIdentificationModule implements IHttpModule
public final class AnonymousIdentificationModule implements IHttpModule
Not applicable.

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.

NoteNote:

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>
System.Object
  System.Web.Security.AnonymousIdentificationModule
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.