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

PermissionSetAttribute

Synopsis

public sealed class PermissionSetAttribute : CodeAccessSecurityAttribute {
// Public Constructors
   public PermissionSetAttribute(SecurityAction action);
// Public Instance Properties
   public string File{set; get; }
   public string Name{set; get; }
   public bool UnicodeEncoded{set; get; }
   public string XML{set; get; }
// Public Instance Methods
   public override IPermission CreatePermission(  );
// overrides SecurityAttribute
   public PermissionSet CreatePermissionSet(  );
}

The PermissionSetAttribute class supports the use of permission sets in declarative security statements. To specify the contents of the permission set, use one of mutually exclusive File, Name, or XML properties. File takes the name of a file that contains the permission set’s XML definition. Name specifies one of the standard immutable named permission sets defined by the .NET Framework (FullTrust, SkipVerification, Execution, Nothing, LocalIntranet, or Internet). XML takes a System.String containing the XML definition of the permission set. To create a permission set that represents unrestricted access, set the Unrestricted property to true.

When required, the runtime calls the CreatePermissionSet( ) method to create a correctly configured System.Security.PermissionSet from the PermissionSetAttribute.

Hierarchy

System.Object System.Attribute SecurityAttribute CodeAccessSecurityAttribute PermissionSetAttribute

Valid On

Assembly, Class, Struct, Constructor, Method

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