Microsoft
70-513 · Question #281
You are creating a Windows Communication Foundation (WCF) service that implements the following service contract. <ServiceContract()> Public Interface IOrderProcessing <OperationContract()> Sub…
The correct answer is B. Add a PrincipalPermission attribute to the method and set the Roles property to Manager. See the full explanation below for the reasoning.
Question
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?
Options
- AIn the method body, check the Rights.PossessProperty property to see if it contains Manager.
- BAdd a PrincipalPermission attribute to the method and set the Roles property to Manager.
- CAdd a SecurityPermission attribute to the method and set the SecurityAction to Demand.
- DIn the method body, create a new instance of WindowsClaimSet.
How the community answered
(27 responses)- A4% (1)
- B74% (20)
- C7% (2)
- D15% (4)
Community Discussion
No community discussion yet for this question.