[英]Get NetworkCredential detail on wcf
I have a REST based WCF service. 我有一个基于REST的WCF服务。 If the client passes login detail through NetworkCredential like :-
如果客户端通过NetworkCredential传递登录详细信息,如:-
WebClient webClient = new WebClient();
webClient.Credentials = new System.Net.NetworkCredential("slash", "slash");
then how can I get these NetworkCredential details in WCF. 那么如何在WCF中获取这些NetworkCredential详细信息。
Try using OperationContext 尝试使用OperationContext
OperationContext.Current.ServiceSecurityContext.WindowsIdentity
or 要么
OperationContext.Current.ServiceSecurityContext.PrimaryIdentity
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.