簡體   English   中英

WCF在WsDualHttpBinding中,服務未對調用方進行身份驗證

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

我有一個使用wsDualHttpBinding的wcf服務,當我嘗試使用同一域中的另一台pc連接到該服務時,出現該錯誤。

這是我的客戶端配置:

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

如果我將安全性更改為:

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

我收到超時例外。

有人對此有解決方案嗎? 請注意,即時通訊不使用wsDualHttpBinding(基本或wsHttpBinding)。

我不得不把它作為客戶端配置:

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

請注意,將security mode為“ None並將negotiateServiceCredentialfalse

同樣在服務器中,綁定應為:

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

注意security modeNone

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM