c# - 如何从 WCF AuthenticationService 获取用户名?

标签 c# wcf

AuthenticationService.isLoggedIn() 的结果为真时,如何获取登录用户的名称?

谢谢。

最佳答案

通常我会从 ServiceSecurityContext.Current 中找到 WCF 安全信息。试试 ServiceSecurityContext.Current.PrimaryIdentity

关于c# - 如何从 WCF AuthenticationService 获取用户名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/613989/

相关文章:

c# - 来自 dll 的类型转换器

c# - 基于每个元素调试 LINQ

c# - 字段 'LogicalName' 缺少必需的成员 'Target'

c# - .NET 外部通信

c# - Win 7 中的 "pin to desktop",兼容 XP

c# - 从 websocket 服务器(用 c#/vb.net 编写)接收数据作为图像

c# - IIS6 中托管的 WCF 服务中的默认目录?

WCF 吞吐量低于预期

wcf 服务返回 "method not allowed"错误

c# - 如何使用 Visual Studio 2012 在 IIS 8.0 中部署 WCF Web 服务?