Code Access Security Policy Tool. Modify security policy for the machine policy level, the user policy level, and the enterprise policy level.
Trust a single file:
Trust a folder:
For the most common options, trusting a file or folder (Machine policy level) paste the path into the relevant box above and press calculate.
In most cases you should specify a specific version of caspol e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.x.xxxxx\Caspol.exe
If you run the Caspol.exe that was installed with version X of the runtime, the changes apply only to that version. Other side-by-side installations of the runtime, if any, are not affected. If you run Caspol.exe from the command line without being in a directory for a specific runtime version, the tool is executed from the first runtime version directory in the path (usually the most recent version installed).
When a user without administrative rights runs Caspol.exe, all options refer to the user level policy unless the -machine option is specified. When an administrator runs Caspol.exe, all options refer to the machine policy unless the –user option is specified.
For advanced usage - see the full syntax on MSDN - Code Access Security Policy Tool
“Change is the law of life. And those who look only to the past or the present are certain to miss the future” ~ John F. Kennedy
Related:
CasPol wrapper for PowerShell - Peter Kriegel/TechNet.
Code Access Security Policy GUI Utility - Brandon Potter.
SC - Service Control.