Understanding the System.Security. Permissions Namespace


Understanding the System.Security. Permissions Namespace

The System.Security.Permissions namespace provides permission objects used to access resources (see the FileDialogPermission class and the FileDialogPermissionAttribute attribute). These permissions also describe tasks that users and code want to perform (see the RegistryPermission class and the RegistryPermissionAttribute attribute).

Most of the entries come in class and attribute pairs. You use the classes to request access to a resource to perform a task. Use the attributes to define access to the resource or the ability to perform a task. See Listing 2.2 for an example of how to use this namespace. Of course, this namespace is discussed several times throughout the book.

Tip

You can find a complete description of the System.Security.Permissions namespace at http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermissions.asp. The elements in this namespace also have a big effect on the CodeAccessPermission class discussed in the “SecurityManager Class Example” section. The CodeAccessPermission class is part of the System.Security.CodeAccessPermission namespace.




.Net Development Security Solutions
.NET Development Security Solutions
ISBN: 0782142664
EAN: 2147483647
Year: 2003
Pages: 168

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