70-513 · Question #286
You are developing a Windows Communication Foundation (WCF) service that returns location information for authorized law enforcement agencies. The service contract is as follows. Users are…
The correct answer is A. Add a PrincipalPermissionAttribute to each method that should be available only to members B. Use the CurrentPrincipal property of the thread. See the full explanation below for the reasoning.
Question
You are developing a Windows Communication Foundation (WCF) service that returns location information for authorized law enforcement agencies. The service contract is as follows. Users are authenticated and impersonated. The system uses ASP.NET roles. The members of law enforcement are members of the LawEnforcement role. You need to ensure that only members of the LawEnforcement role can call these methods. What are two possible ways to achieve this goal (Each correct answer presents a complete solution. Choose two.)
Exhibit
Options
- AAdd a PrincipalPermissionAttribute to each method that should be available only to members
- BUse the CurrentPrincipal property of the thread.
- CCreate a GenericPrincipal specifying Thread.CurrentPrincipal.Identity as the
- DAt the beginning of each method, enumerate each ClaimSet in a new WindowsClaimSet.
How the community answered
(52 responses)- A75% (39)
- C15% (8)
- D10% (5)
Community Discussion
No community discussion yet for this question.
