C# 如何强制 .net WCF 客户端在 basicHttpBinding 中使用 NTLM?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1134119/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to force a .net WCF client to use NTLM in an basicHttpBinding?
提问by abudker
right now I have the security node defined like this:
现在我有这样定义的安全节点:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
Im getting the following error:
我收到以下错误:
The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'NTLM'.
HTTP 请求未经授权,客户端身份验证方案为“协商”。从服务器收到的身份验证标头是“NTLM”。
采纳答案by JP Alioto
Change your clientCredentialTypeto "Ntlm".
将您的clientCredentialType更改为“ Ntlm”。