Microsoft
70-513 · Question #56
A self-hosted Windows Communication Foundation (WCF) service uses a secure HTTP binding with a custom principal permission mode. The binding requires users to provide their Windows logon…
The correct answer is C. ServiceSecurityContext.Current.PrimaryIdentity.Name D. OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name. See the full explanation below for the reasoning.
Question
A self-hosted Windows Communication Foundation (WCF) service uses a secure HTTP binding with a custom principal permission mode. The binding requires users to provide their Windows logon credentials. You need to retrieve the identity of the caller. What are two possible properties you can use to achieve this goal? (Each correct answer presents a complete solution Choose two)
Options
- AThread.CurrentPrincipal.Identity.Name
- BHttpContext.Current.User.Identity.Name
- CServiceSecurityContext.Current.PrimaryIdentity.Name
- DOperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name
How the community answered
(47 responses)- A9% (4)
- B17% (8)
- C74% (35)
Community Discussion
No community discussion yet for this question.