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)

<SerializableAttribute> _
Public NotInheritable Class FormsIdentity
	Implements IIdentity
Dim instance As FormsIdentity

/** @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.

  • AspNetHostingPermission  for using the FormsIdentity class in a hosted environment. Demand value: LinkDemand. Permission value: Minimal.


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