Which attribute should you place on the method?

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?

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) _>



Leave a Reply 0

Your email address will not be published. Required fields are marked *