You are developing a method to call a COM component. You need to use declarative security to
explicitly request the runtime to perform a full stack walk. You must ensure that all callers have
the required level of trust for COM interop before the callers execute your method. Which attribute
should you place on the method?
A. [SecurityPermission(
SecurityAction.Demand,
Flags=SecurityPermissionFlag.UnmanagedCode)]
B. [SecurityPermission(
SecurityAction.LinkDemand,
Flags=SecurityPermissionFlag.UnmanagedCode)]
C. [SecurityPermission(
SecurityAction.Assert,
Flags = SecurityPermissionFlag.UnmanagedCode)]
D. [SecurityPermission(
SecurityAction.Deny,
Flags = SecurityPermissionFlag.UnmanagedCode)]
Answer: A
explicitly request the runtime to perform a full stack walk. You must ensure that all callers have
the required level of trust for COM interop before the callers execute your method. Which attribute
should you place on the method?
A. [SecurityPermission(
SecurityAction.Demand,
Flags=SecurityPermissionFlag.UnmanagedCode)]
B. [SecurityPermission(
SecurityAction.LinkDemand,
Flags=SecurityPermissionFlag.UnmanagedCode)]
C. [SecurityPermission(
SecurityAction.Assert,
Flags = SecurityPermissionFlag.UnmanagedCode)]
D. [SecurityPermission(
SecurityAction.Deny,
Flags = SecurityPermissionFlag.UnmanagedCode)]
Answer: A
No comments:
Post a Comment