解决办法

 组件服务-> 计算机->我的电脑->属性-> MSDTC->安全配置

1 check 允许远程客户端,

2 radio 不要求进行验证

3 启用XA事务

-------------------------------------------------------------------------------------

TransactionScope implicitly or explicitly committed or aborted


http://bytes.com/forum/thread416413.html

------------------------------------------------------------------------
from http://blog.csdn.net/night_elf/archive/2007/09/18/1789885.aspx

[COMException (0x8004d00e): 此事务已明地或暗地被确认或终止 (异常来自 HRESULT:0x8004D00E)]
   System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32& cookieIndex, UInt32& cookieSize, CoTaskMemHandle& cookieBuffer) +0
   System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) +237

[TransactionException: 事务已被隐式或显式提交,或已终止。]
   System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) +412
   System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) +292
   System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) +527
   System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx) +801124
   System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction) +795031
   System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction) +30
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1205
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111

一般都是使用.net 2.0 下的Transactionscope引起的,通过搜索,大部分给出的答案是:

win2003缺省禁用远程/网络事务,启用的步骤如下:    
  启用网络   DTC   访问的步骤    
  1.   单击“开始”,指向“控制面板”,然后单击“添加/删除程序”。    
  2.   单击“添加/删除   Windows   组件”。    
  3.   选择“应用程序服务器”,然后单击“详细信息”。    
  4.   选择“启用网络   DTC   访问”,然后单击“确定”。    
  5.   单击“下一步”。    
  6.   单击“完成”。    
  7.   停止分布式事务协调器服务,然后重新予以启动。    
  8.   停止参与分布式事务的任何资源管理器服务(如   Microsoft   SQL   Server   或   Microsoft   Message   Queue   Server),然后重新予以启动。     
   

这样做下来,我相信大部分人还是不行,再经过一番搜索,原来还需要两台机器能够ping的通hostname,这里还需要设置%windir%"WinNT"System32"Drivers"下的host文件,写上IP和HostName的对应信息,如

192.168.0.6 myhostname

请确保这一点: 两台机器能够ping通机器名(不是IP)

这里要特别注意你的防火墙,它有可能能让你ping不同机器名,更可能让两台机器之间禁止RPC服务,可见下面的一段资料:


If pinging Server2 from Server1 by NetBios name fails, or if pinging Server2 from Server1 by NetBios name succeeds but the DTCPing test shows RPC communication still fails, it is possible that Port 135 (the End Point Mapper, or EPM) has not been opened bi-directionally on the firewall. Check the firewall to make sure that the EPM is open in both directions. At this point, a Network Monitor trace may help to pinpoint the problem.

你也可以使用DTCping工具来测试是否可以在两台机器之间使用MSDTC,并帮你分析原因,下载地址可以到微软的站点