2010-12-02 42 views
1

我有一个WCF-WSHttp发送端口设置与启用事务检查,我得到当发送消息以下错误:的BizTalk WCF发送端口错误 - 头“的CoordinationContext”不可理解

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> 

提前感谢!

+0

只是一个想法,但你可能会与非的BizTalk WCF客户端第一次尝试这确保事务流设置正确 - http://msdn.microsoft.com/en-us/library/ms733943.aspx – StuartLC 2010-12-06 05:16:05

回答

0

原来问题出在服务本身。虽然绑定用transactionFlow =“真”,该服务合同是缺少以下属性明确允许交易正确配置:

[System.ServiceModel.TransactionFlowAttribute(System.ServiceModel.TransactionFlowOption.Allowed)] 
相关问题