4

私たちの 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」アクションのメッセージに対して署名メッセージ パーツが指定されていません。

クライアントでreliableSessionを無効にすると、次のメッセージが表示されます:このエンドポイントではアクションはサポートされていません。このエンドポイントで処理されるのは、WS-ReliableMessaging 2005 年 2 月のメッセージのみです。

したがって、サーバーはRM用に正しく構成されているようです。

発生したエラーについて価値のあるものを見つけることができないため、これを修正する方法がわかりません。何が間違っている可能性がありますか?

少し早いですがお礼を、

ロブ

4

2 に答える 2

3

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 つしかない場合でも)。

于 2010-05-27T08:20:10.733 に答える
2

クライアントとサーバーのセキュリティ設定が一致していないと思います。

クライアントには次のものがあります。

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

サーバーには何もありません.....

クライアントとサーバーの両方を同じ設定にすることはできますか? それで効くの??

于 2010-05-26T14:01:10.843 に答える