Application Development Using Visual Basic® and .NET
by Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Code Access Permissions
Code needs permissions in order to access a resource such as a file or to perform certain operations. A security policy (discussed later in the chapter) will give certain permissions to each assembly. Code access permissions can be requested by code. The CLR will decide which permissions to grant based on the security policy for that assembly. You can even implement your own custom permissions for very specialized security situations. However, that is beyond the scope of this book. Here are some examples of predefined code access permissions:
DNSPermission controls access to domain name servers on the network.
EnvironmentPermission controls read or write access to environment variables.
FileIOPermission controls access to ...
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.
Read now
Unlock full access