Gets or sets the current principal.

Namespace:  EPiServer.Security
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236


public static IPrincipal CurrentPrincipal { get; set; }

Field Value

The current principal.


This method will use the HttpContext.Current.User setting if an HttpContext exists, otherwise it will fall back to the the Thread.CurrentPrincipal setting.

When you get the current principal you are assured to always get a valid IPrincipal.

See Also