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

PolicyStatementAttribute

Synopsis

public enum PolicyStatementAttribute {
   Nothing = 0x00000000,Exclusive = 0x00000001,LevelFinal = 0x00000002,All = 0x00000003
}

The PolicyStatementAttribute enumeration is used in conjunction with the PolicyStatement class. PolicyStatementAttribute contains values that are assigned to the PolicyStatement.Attributes property to define a code group’s attributes. Code group attributes affect the policy resolution process by controlling how the permissions granted by one code group are merged with the permissions granted by other code groups.

The Exclusive value specifies that the permissions granted by the code group are the maximum set of permissions that a group member can receive from the current policy level. Because the permissions granted by each policy level intersect to determine the final grant set, a code group with the Exclusive attribute actually defines the maximum set of permissions in the final grant set. An assembly or application domain can be a member of at most one Exclusive code group per policy level, or the runtime throws a PolicyException.

Policy levels are resolved in the order enterprise, machine, user, and finally application domain. The LevelFinal value specifies that no policy levels below the current level will be evaluated. If resolving the permissions for an assembly, the runtime always evaluates the application domain policy regardless of whether the assembly is the member of a LevelFinal code group.

PolicyStatementAttribute ...

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