An administrator can configure code access security policy to constrain the operations of .NET Framework code (assemblies.) In this How To, you configure code access security policy to constrain the ability of an assembly to perform file I/O and restrict file I/O to a specific directory.
You use the.NET Framework 1.1 Configuration tool to create a new permission set and a new code group. The permission set defines what the code can and cannot do, and the code group associates the permission set with particular code, for example a specific assembly or set of assemblies.
In addition to constraining file I/O, you can use code access security policy to impose other constraints on code. For example, you can restrict the ability of code to access other types of resources protected by code access security, including databases, directory services, event log, registry, Domain Name System (DNS) servers, unmanaged code, and environment variables .
Note | This list is not exhaustive but represents many of the common resource types accessed by Web applications. |