简体   繁体   English

WCF在WsDualHttpBinding中,服务未对调用方进行身份验证

[英]WCF The caller was not authenticated by the service in a WsDualHttpBinding

I have a wcf service which use wsDualHttpBinding, i get that error when i try to connect to it using a different pc in the same domain. 我有一个使用wsDualHttpBinding的wcf服务,当我尝试使用同一域中的另一台pc连接到该服务时,出现该错误。

here is my client config: 这是我的客户端配置:

       <binding name="WSDualHttpBinding_IRouter" closeTimeout="00:00:05"
        openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05"
        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>

if i change security to : 如果我将安全性更改为:

        <binding name="WSDualHttpBinding_IRouter" closeTimeout="00:00:05"
        openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05"
        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 negotiateServiceCredential="false" clientCredentialType="None" />
      </security>

    </binding>

i get time out exception. 我收到超时例外。

any one has a solution to that ? 有人对此有解决方案吗? please be advised that im using wsDualHttpBinding not (basic or wsHttpBinding). 请注意,即时通讯不使用wsDualHttpBinding(基本或wsHttpBinding)。

i Had to put this as the Client Config: 我不得不把它作为客户端配置:

     <binding name="WSDualHttpBinding_IReceiverController" closeTimeout="00:00:05"
        openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05"
        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>

Notice turning security mode to None and negotiateServiceCredential to false 请注意,将security mode为“ None并将negotiateServiceCredentialfalse

also in the server the binding should be: 同样在服务器中,绑定应为:

 <binding name="WSDualHttpBinding_IReceiverController" closeTimeout="00:00:05"
        openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05"
        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>

Notice security mode is None 注意security modeNone

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM