FormsAuthenticationEventArgs::User Property
Gets or sets the IPrincipal object to be associated with the current request.
Assembly: System.Web (in System.Web.dll)
public: property IPrincipal^ User { IPrincipal^ get(); [SecurityPermissionAttribute(SecurityAction::Demand, ControlPrincipal = true)] void set(IPrincipal^ value); }
Property Value
Type: System.Security.Principal::IPrincipal^The IPrincipal object to be associated with the current request.
You can use the User property to set the User property of the current HttpContext to a custom IPrincipal object.
If you do not specify a value for the User property during the FormsAuthentication_OnAuthenticate event, the identity supplied by the forms authentication ticket in the cookie or URL is used.
The following example uses the FormsAuthentication_OnAuthenticate event to set the User property of the current HttpContext to a GenericPrincipal object with a custom Identity.
Available since 1.1