You need to ensure that only users with the Manager role can call the ApproveOrder method

You are creating a Windows Communication Foundation (WCF) service that implements the
following service contract. <ServiceContract()> Public Interface IOrderProcessing
<OperationContract()> Sub ApproveOrder(ByVal id As Integer) End Interface You need to
ensure that only users with the Manager role can call the ApproveOrder method. What
should you do?

You are creating a Windows Communication Foundation (WCF) service that implements the
following service contract. <ServiceContract()> Public Interface IOrderProcessing
<OperationContract()> Sub ApproveOrder(ByVal id As Integer) End Interface You need to
ensure that only users with the Manager role can call the ApproveOrder method. What
should you do?

A.
In the method body, create a new instance of WindowsClaimSet. Use the FindClaims

method to locate a claimType named Role with a right named Manager.

B.
In the method body, check the Rights.PossessProperty property to see if it contains
Manager.

C.
Add a PrincipalPermission attribute to the method and set the Roles property to
Manager.

D.
Add a SecurityPermission attribute to the method and set the SecurityAction to Demand.



Leave a Reply 0

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