C# 如何从WCF AuthenticationService获取用户名?
当C# 如何从WCF AuthenticationService获取用户名?,c#,wcf,C#,Wcf,当AuthenticationService.isLoggedIn()的结果为true时,如何获取登录用户的名称 谢谢。您试过查看Thead.CurrentPrincipal吗?通常我会从ServiceSecurityContext.Current找到WCF安全信息。请尝试ServiceSecurityContext.Current.PrimaryIdentity
AuthenticationService.isLoggedIn()
的结果为true时,如何获取登录用户的名称
谢谢。您试过查看Thead.CurrentPrincipal吗?通常我会从ServiceSecurityContext.Current找到WCF安全信息。请尝试ServiceSecurityContext.Current.PrimaryIdentity
WebContext.Current.Authentication