Name
PrincipalPolicy
Synopsis
public enum PrincipalPolicy { UnauthenticatedPrincipal = 0,NoPrincipal = 1,WindowsPrincipal = 2 }
The values of this enumeration are used in the
System.AppDomain.SetPrincipalPolicy( )
method.
SetPrincipalPolicy( )
specifies how default
IIdentity
and IPrincipal
objects are created for threads running in the application domain if
an IPrincipal
has not been assigned to the thread
by the program or host.
The value NoPrincipal
means that the runtime does
not create default identity or principal objects for a thread.
UnauthenticatedPrincipal
means that the runtime
will assign threads a GenericPrincipal
containing
an empty role set and a GenericIdentity
that
represents an unnamed user. The WindowsPrincipal
value causes the runtime to create a
WindowsPrincipal
object and assign it to the
thread. The WindowsPrincipal
object contains a
WindowsIdentity
that represents the currently
active Windows user account and a set of roles that represent the
Windows user groups to which the user belongs.
UnauthenticatedPrincipal
is the default value.
Hierarchy
System.Object
→
System.ValueType
→
System.Enum(System.IComparable,
System.IFormattable
, System.IConvertible)
→
PrincipalPolicy
Passed To
System.AppDomain.SetPrincipalPolicy( )
Get Programming .NET Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.