隐秘的WCF身份验证错误

时间:2015-06-01 18:54:23

标签: c# asp.net wcf authentication

我有一个ASP.net网站设置,我试图通过调用WCF服务。该服务返回以下(无意义)错误:

The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'

WCF客户端和服务器是从代码生成的,具有以下绑定定义:

客户端BasicHttpBinding

var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

服务器BasicHttpBinding

basicHttpBinding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
basicHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

IIS配置
IIS配置为仅用于NTLM身份验证,如下所示:IIS Auth Config

Windows身份验证提供程序配置如下:
IIS Windows Auth Config

此配置在其他两个环境中有效。这两者之间的唯一区别是,工作服务器在Windows 2008 R2上运行,非工作环境在Windows 2012上。

我还应该注意什么?

0 个答案:

没有答案