Assemblies specify security permission requests to communicate to administrators the minimum permissions that are required to execute the assembly, and to limit security vulnerabilities caused by mistakenly omitting demands at the type and member level. Assemblies should be marked with security permissions requirements by using the following members of the System.Security.Permissions.SecurityAction enumeration:
This rule is satisfied if any of the actions is specified. Specify RequestMinimum to prevent the assembly from loading if the specified permissions have not been granted to the caller. Use this action when the caller always needs the permission to have access to anything defined in the assembly. Use the RequestOptional security action to specify permissions that are used if granted. When there are permissions that should not be granted to the assembly, specify these using RequestRefuse. If the assembly refuses permissions, it is not granted these permissions, regardless of the permissions it would be granted by the current security policy.
This rule reports a violation if you have specified a permission request incorrectly, or incompletely. If you have specified requests but a violation of this rule is reported, use the Permission Calculator Tool (Permission Calculator Tool (Permcalc.exe)) to estimate the permissions callers must be granted to access the public entry points of an assembly. This tool is new in the .NET Framework SDK version 2.0.