Welcome

首页 / 软件开发 / .NET编程技术 / WCF分布式开发常见错误(15)

WCF分布式开发常见错误(15)2011-03-31 博客园 Frank Xu LeiWCF分布式开发常见错误(15):Communication with the underlying transaction manager has failed

今天本地调试WCF事务的时候出现这个错误:Communication with the underlying transaction manager has failed.

搜索了很多资料,查找原因。是因为MSDTC的问题.此协议要使用分布式事务协调器。 或者是事务协议的问题。

解决办法:

修改事务通信协议。

<bindings>
<netTcpBinding >
<binding name="netTcpBindingTcp" transactionFlow="true" >
<!--transactionProtocol="WSAtomicTransactionOctober2004"-->// 本地调试不适用这个事务协议即可
<!--<reliableSession enabled="true" ordered="true"/>
<security mode="None"></security>-->
</binding>
</netTcpBinding>
</bindings>

2.检查MS DTC 设置。【控制面板->性能和维护->管理工具->组件服务-> 计算机->我的电脑->属性->MS- DTC 选项卡->安全性配置。

参考文章链接:

1.http://social.msdn.microsoft.com/Forums/en- US/windowstransactionsprogramming/thread/71f7a219-c85d-4a04-973b-c73464f59606 ;

2.http://msforums.ph/forums/t/38399.aspx

3.http://www.cnblogs.com/ThinkCode/archive/2008/10/14/1311021.html