WCF服务在1台服务器上引发身份验证错误

时间:2018-12-05 20:01:38

标签: wcf

我们有一个WCF服务,该服务通过负载均衡器部署在4台服务器上。 如果服务器的在线抛出以下错误,则从这4个服务器中,选择1个。

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

如果该服务器被删除,其余3台可以正常工作,但是只有1台服务器出现此问题。 考虑到文件和配置在所有4台服务器上都相同,唯一的区别是服务器或IIS安装。

有人知道这可能是什么原因吗?

它的basicHttpBinding与 服务器配置:

<security mode="Transport">
    <transport clientCredentialType="None" proxyCredentialType="None"/>
</security>

客户端配置:

<security mode="Transport">
    <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
    <message clientCredentialType="UserName" algorithmSuite="Default" />
</security>

1 个答案:

答案 0 :(得分:0)

我认为IIS身份验证配置有问题。请在IIS托管的应用程序中打开身份验证模块,然后启用相应的身份验证模式。 enter image description here

具体的身份验证支持取决于您的项目身份验证模式。 https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831496(v=ws.11)#Impersonation
随时让我知道是否有什么可以帮助您的。

相关问题