Skip to Content
Programming .NET Security
book

Programming .NET Security

by Adam Freeman, Allen Jones
June 2003
Intermediate to advanced
714 pages
22h 8m
English
O'Reilly Media, Inc.
Content preview from Programming .NET Security

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( )

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET Framework Security

.NET Framework Security

Brian A. LaMacchia, Sebastian Lange, Matthew Lyons, Rudi Martin, Kevin T. Price
.NET Security and Cryptography

.NET Security and Cryptography

Peter Thorsteinson, G. Gnana Arun Ganesh
ASP.NET Core Security

ASP.NET Core Security

Christian Wenz

Publisher Resources

ISBN: 0596004427Supplemental ContentErrata Page