Winforms WCF错误:调用方未通过WsDualHttpBinding中的服务的身份验证

Winforms WCF错误:调用方未通过WsDualHttpBinding中的服务的身份验证,winforms,wcf,exception,Winforms,Wcf,Exception,我目前正在开发发布-订阅wcf服务。正在尝试在一台计算机上运行订阅服务器(winforms app),并在另一台计算机上运行服务(在winforms app上运行)。连接时,它会给出SecurityNegotiationException,后跟错误消息 服务未对调用方进行身份验证 客户端配置: <system.serviceModel> <bindings> <wsDualHttpBinding> <binding name="WSDualH

我目前正在开发发布-订阅wcf服务。正在尝试在一台计算机上运行订阅服务器(winforms app),并在另一台计算机上运行服务(在winforms app上运行)。连接时,它会给出SecurityNegotiationException,后跟错误消息

服务未对调用方进行身份验证

客户端配置:

<system.serviceModel>
<bindings>
  <wsDualHttpBinding>
    <binding name="WSDualHttpBinding_IPostingContract" clientBaseAddress="http://192.168.1.101:8000/wcfClient/" 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="None">
        <message clientCredentialType="None" negotiateServiceCredential="False"/>
      </security>
    </binding>
  </wsDualHttpBinding>
</bindings>

<client>
  <endpoint address="http://192.168.1.101:8888/PostingContract/Posting"
      binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IPostingContract"
      contract="IPostingContract" name="WSDualHttpBinding_IPostingContract">
  </endpoint>
</client>

服务配置:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
  <wsDualHttpBinding>
    <binding name="WSDualHttpBinding_IPostingContract" clientBaseAddress="http://localhost:8000/wcfClient/" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:00:20"
        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="None" />
    </binding>
  </wsDualHttpBinding>
</bindings>

如果我将客户端的安全模式更改为Message,这是原始模式,那么即使在等待5分钟后,我也会收到timeoutexception。在阅读了其他人提出的大多数问题后,大多数人建议不要提出任何问题

请注意,这是WSDualHttpBinding,而不是基本绑定