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

SecurityAction

Synopsis

public enum SecurityAction {
   Demand = 2,Assert = 3,Deny = 4,PermitOnly = 5,LinkDemand = 6,InheritanceDemand = 7,
        RequestMinimum = 8,RequestOptional = 9,RequestRefuse = 10
}

The SecurityAction enumeration contains values that represent the different declarative security statements. Every permission attribute class derived from the CodeAccessSecurityAttribute class defines a constructor that takes a value of the SecurityAction enumeration as an argument. The value of the SecurityAction argument identifies the action that the declarative security statement performs, and determines the program elements that are valid targets for the security attribute. The nine values of the SecurityAction enumeration fall into three categories: security demands, permission requests, and stack overrides. Declarative security demands and stack overrides can be applied to classes and functional members (i.e., methods, properties, and events), whereas permission requests are valid only at the assembly level.

The security demands include the values Demand, InheritanceDemand, and LinkDemand. Demand initiates a security demand, which will result in a stack walk when used with an attribute whose permission counterpart implements the System.Security.IStackWalk interfaces. This includes all code-access and identity permissions, but not PrincipalPermission, which only implements the System.Security.IPermission interface. The InheritanceDemand and LinkDemand statements have no imperative ...

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