Before You Begin


Code access security permissions must derive from System.Security.CodeAccessPermission , which provides an implementation of the Demand method defined by the IPermission interface, together with others such as Assert , Deny , and PermitOnly , which are defined by the IStackWalk interface.

Code access permissions (not identity permissions) also implement the IUnrestrictedPermission interface, to indicate that the permission is part of the unrestricted permission set. This means that the permission is automatically granted to any code that has full trust. The inheritance hierarchy for the custom EncryptionPermission implemented in this How To is shown in Figure 8.

click to expand
Figure 8: Custom EncryptionPermission inheritance hierarchy

The custom EncryptionPermission class maintains the following states:

  • EncryptionPermissionFlag . Determines whether code that is granted this permission is able to encrypt data, decrypt data, or both.

  • StorePermissionFlag . Determines whether code that is granted this permission is able to use DPAPI with the machine store, current user store, or both.




Improving Web Application Security. Threats and Countermeasures
Improving Web Application Security: Threats and Countermeasures
ISBN: 0735618429
EAN: 2147483647
Year: 2003
Pages: 613

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net