BizTalk WCF 发送端口错误 - 标头“CoordinationContext”不被理解

发布于 2024-10-05 21:43:55 字数 1829 浏览 5 评论 0原文

我设置了 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>

提前致谢!

I have a WCF-WSHttp Send Port set up with Enable Transactions checked, and I'm getting the following error when a message is sent:

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. 

If I uncheck the Enable Transactions box, the message is processed successfully. Can anyone help me get this working with transaction support?

Here's the binding info from the service's web.config (transactionFlow is set to 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>

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩发小公举 2024-10-12 21:43:55

这可能是 MSDTC 设置的问题,请参阅 http://msdn.microsoft .com/en-us/library/ms752261.aspx

另请检查事件日志中是否有与 MSDTC 相关的错误。

It could be a problem with the setup of MSDTC, see http://msdn.microsoft.com/en-us/library/ms752261.aspx

Also check the event log for MSDTC related errors.

她如夕阳 2024-10-12 21:43:55

事实证明问题出在服务本身。尽管使用 transactionFlow="true" 正确配置了绑定,但服务合约缺少以下属性来显式允许事务:

[System.ServiceModel.TransactionFlowAttribute(System.ServiceModel.TransactionFlowOption.Allowed)]

Turns out the problem was with the service itself. Although the bindings were configured properly with transactionFlow="true", the service contract was missing the following attribute to explicitly allow transactions:

[System.ServiceModel.TransactionFlowAttribute(System.ServiceModel.TransactionFlowOption.Allowed)]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文