【发布时间】:2015-10-30 20:48:53
【问题描述】:
我们有一个 WCF 服务,它曾经安装在域计算机上。我们的客户能够使用当前用户的域凭据连接到该服务并调用 WCF 方法。
这是我们使用的绑定配置:
<netTcpBinding>
<binding ...>
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="None" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
现在由于某些技术原因,我们不得不将服务移至无法加入域的机器上。是否仍然可以使用 WCF 传输安全性进行客户端身份验证?
当客户端尝试调用 WCF 方法时,会收到以下错误:
System.ServiceModel.Security.SecurityNegotiationException: The server has rejected the client credentials. --->
System.Security.Authentication.InvalidCredentialException: The server has rejected the client credentials. --->
System.ComponentModel.Win32Exception: The logon attempt failed
我已尝试使用runas /netonly 运行该服务。该更改使服务能够使用域凭据连接到后端 SQL 服务器,但它对尝试连接到服务的客户端没有帮助。
我进行了一些搜索并阅读了有关 WCF 模拟、Kerberos 令牌、CredSSP 和其他技术的信息,但我不确定这些技术是否对我的情况有帮助,我应该走哪条路或从哪里开始。谢谢。
【问题讨论】:
标签: c# wcf windows-authentication kerberos wif