簡體   English   中英

WCF可靠會話(可靠消息傳遞)的問題

[英]Problems with WCF reliable session (reliable messaging)

在我們的WCF應用程序中,我試圖配置可靠的會話。

服務:

 <wsHttpBinding>
    <binding name="BindingStabiHTTP" maxBufferPoolSize="524288"
             maxReceivedMessageSize="2097152"
             messageEncoding="Text">
       <reliableSession enabled="true" ordered="true" 
                        inactivityTimeout="00:10:00"/>
          <readerQuotas maxDepth="0" maxStringContentLength="0" 
                        maxArrayLength="0" maxBytesPerRead="0"
                        maxNameTableCharCount="0" />
    </binding>
 </wsHttpBinding>

客戶:

 <wsHttpBinding>
    <binding name="BindingClientWsHttpStandard" 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" allowCookies="false">
       <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                     maxArrayLength="16384" maxBytesPerRead="4096"
                     maxNameTableCharCount="16384" />
       <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="true" />
       <security mode="Message">
          <transport clientCredentialType="Windows" proxyCredentialType="None"
                     realm="" />
          <message clientCredentialType="Windows" 
                   negotiateServiceCredential="true"
                   algorithmSuite="Default" establishSecurityContext="true" />
       </security>
    </binding>

不幸的是,我收到如下錯誤:沒有使用' http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence '操作為消息指定簽名消息部分。

如果在客戶端上禁用了可靠會話,則會收到以下消息:該端點不支持該操作。 該端點僅處理2005年2月WS-ReliableMessaging消息。

因此,似乎服務器已正確配置為RM。

我找不到關於我得到的錯誤的任何有價值的信息,所以我不知道如何解決。 有什么想法可能是錯誤的嗎?

預先感謝,

在啟動一個適用於RM的新測試項目后,我最終通過比較配置文件找到了問題。 看來我們的服務配置未指定正確的綁定配置:

<service behaviorConfiguration="somebehavior"
         name="somename">
   <endpoint address="" binding="wsHttpBinding" 
             bindingConfiguration="SomeBinding"
             name="http" 
             contract="somecontract" />
   <endpoint address="mex" 
             binding="mexHttpBinding" 
             bindingConfiguration=""
             name="mex" 
             contract="IMetadataExchange" />
   <host>
      <baseAddresses>
         <add baseAddress="http://localhost:8731/Design_Time_Addresses/somelibrary/someservice/" />
      </baseAddresses>
   </host>
</service>

此bindingConfiguration為空。 然后,它將采用默認的wsHttpBinding,它與指定的默認值不同(即使只有1個)。

我認為客戶端和服務器的安全設置不匹配。

客戶有:

<security mode="Message">
   <transport clientCredentialType="Windows" 
               proxyCredentialType="None" realm="" />
   <message clientCredentialType="Windows" negotiateServiceCredential="true"
             algorithmSuite="Default" establishSecurityContext="true" />
</security>

服務器根本沒有任何東西.....

您可以嘗試為客戶端和服務器設置相同的設置嗎? 那行嗎?

暫無
暫無

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

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