Ari*_*ian 8 c# wcf wcf-security
考虑使用WsHttpBinding
仅允许域用户调用此服务的WCF 服务.
如何找到呼叫者的Active Directory用户名?
Res*_*ing 14
获得System.ServiceModel.ServiceSecurityContext.Current.WindowsIdentity.Name
财产的价值.
只要安全模式None
与绑定不同,使用哪种绑定无关紧要.
如果安全模式None
,然后System.ServiceModel.ServiceSecurityContext.Current
会null
.
您可以通过以下方式获取用户的身份:
ServiceSecurityContext.Current.WindowsIdentity.Name
Run Code Online (Sandbox Code Playgroud)
要么
OperationContext.Current.ServiceSecurityContext.WindowsIdentity.Name
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7341 次 |
最近记录: |