سؤال

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.

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).

هل كانت مفيدة؟

المحلول

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

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top