FormsIdentity Class
Collapse the table of content
Expand the table of content

FormsIdentity Class

Represents a user identity authenticated using forms authentication. This class cannot be inherited.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

public sealed class FormsIdentity : IIdentity
/** @attribute SerializableAttribute() */ 
public final class FormsIdentity implements IIdentity
public final class FormsIdentity implements IIdentity
Not applicable.

The FormsIdentity class is used by the FormsAuthenticationModule when a user is authenticated with forms authentication. An instance of the FormsIdentity class is created using the FormsAuthenticationTicket that is decrypted from the forms-authentication cookie or from the URL. The new instance of the FormsIdentity class is used to construct a new GenericPrincipal object that is set as the value of the User property for the current HttpContext.


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, 1.1, 1.0

Community Additions

© 2015 Microsoft