1

[トランザクションを有効にする] をオンにして WCF-WSHttp 送信ポートをセットアップしましたが、メッセージの送信時に次のエラーが発生します。

The header 'CoordinationContext' from the namespace 'http://schemas.xmlsoap.org/ws/2004/10/wscoor' was not understood by the recipient of this message, causing the message to not be processed.  This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process.  Please ensure that the configuration of the client's binding is consistent with the service's binding. 

[トランザクションを有効にする] ボックスをオフにすると、メッセージは正常に処理されます。トランザクションサポートでこれを機能させるのを手伝ってくれる人はいますか?

サービスの web.config からのバインディング情報は次のとおりです (transactionFlow は true に設定されています)。

<bindings>
      <wsHttpBinding>
        <binding name="serviceBinding" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            bypassProxyOnLocal="false" transactionFlow="true" 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="false" />
          <security mode="Transport">
            <transport clientCredentialType="Ntlm" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>

前もって感謝します!

4

2 に答える 2

0

問題はサービス自体にあることがわかりました。バインディングは transactionFlow="true" で適切に構成されていましたが、サービス コントラクトにはトランザクションを明示的に許可する次の属性がありませんでした。

[System.ServiceModel.TransactionFlowAttribute(System.ServiceModel.TransactionFlowOption.Allowed)]
于 2010-12-16T14:40:03.237 に答える
0

MSDTC のセットアップに問題がある可能性があります。http://msdn.microsoft.com/en-us/library/ms752261.aspx を参照してください。

また、イベント ログで MSDTC 関連のエラーを確認してください。

于 2010-12-07T20:37:43.910 に答える