Microsoft
70-513 · Question #124
You are creating a Windows Communication Foundation (WCF) service that implements the following service contract. [ServiceContract] public interface IOrderProcessing { [OperationContract] void…
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] void ApproveOrder(int id); } 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 PosessesProperty property to see if it contains
- 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
(28 responses)- A7% (2)
- B86% (24)
- C4% (1)
- D4% (1)
Community Discussion
No community discussion yet for this question.