Answer B

Explanation: You can use declarative code access security to request permissions for the entire assembly. SecurityAction flags that can be specified in an assembly-wide directive. When

SecurityAction.RequestMinimum is specified, it makes a request to the common language runtime to be granted the requested permission. If the requested permission is not granted by the security policy, the assembly will not execute.

A SecurityAction.RequestOptional is similar, but the assembly will still run even if the requested permission is not granted. Specifying SecurityAction.RequestRefuse requests that the assembly be denied the specified permission.

Reference: 70-306/70-316 Training kit, Declarative Code Access Security, Pages 457-458 Incorrect Answers

A: There are only three Security actionAttributes targets for an assembly: RequestMinimumAssembly,

RequestOptionalAssembly, and RequestRefuseAssembly. C, D: Imperative security does not work well to configure security for an entire assembly. In imperative security, permission to execute is demanded at run time.

0 0

Post a comment