您的位置:首页 > 理论基础 > 计算机网络

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the serv

2010-05-05 15:37 459 查看
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

解决方案

1 配置IIS

网站->属性->目录安全性->身份验证方法: 同时选中”匿名访问”和”集成Windows身份验证”

2 配置WCF客户端的Config文件: 有3处地方: 1)security mode, 2)end point的behaviorConfiguration, 3)behaviors

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding …>

<readerQuotas … />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="Windows" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>

<client>
<endpoint ... behaviorConfiguration="ImpersonationBehavior"/>
</client>

<behaviors>
<endpointBehaviors>
<behavior name="ImpersonationBehavior">
<clientCredentials>
<windows allowedImpersonationLevel="Impersonation"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>

</system.serviceModel>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐