调用者未通过服务wsDualHttpBinding进行身份验证

时间:2012-12-20 08:56:17

标签: c# wcf

我已经搜索并尝试应用其他帖子中提供的解决方案,但我无法解决我的问题。

我必须使用wsDualHttpBinding进行双工连接。 当我尝试在与WCF服务器相同的机器上运行我的客户端时,它可以完美运行,但是当我将客户端移动到同一域上的其他机器时,它会返回错误“调用者未被服务验证”< / p>

这是我客户端上的app.config

<wsDualHttpBinding>
  <binding name="duplexendpoint" closeTimeout="00:01:00" openTimeout="00:01:00"
      receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
      transactionFlow="false" hostNameComparisonMode="StrongWildcard"
      maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
      messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
  <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
  <reliableSession ordered="true" inactivityTimeout="00:10:00" />
  <security mode="Message">
      <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
  </security>

  </binding>
</wsDualHttpBinding>

然后我尝试通过代码提供凭证:

client.ClientCredentials.Windows.ClientCredential.UserName = "serverusername";
client.ClientCredentials.Windows.ClientCredential.Password = "serverpassword";
client.ClientCredentials.Windows.ClientCredential.Domain = "serverdomain";

并且它给出错误“客户端无法在配置的超时内完成安全协商”

有什么方法可以解决我的问题吗?感谢。

1 个答案:

答案 0 :(得分:0)

oke我找到了解决问题的方法,我必须从客户机上关闭防火墙。

相关问题