首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >嵌套事务- MSDTC

嵌套事务- MSDTC
EN

Stack Overflow用户
提问于 2012-11-30 01:01:27
回答 2查看 447关注 0票数 2

我在应用程序中设置事务时遇到问题。当我执行轻量级事务时,它可以工作:

代码语言:javascript
复制
using (TransactionScope tx = new TransactionScope())
{
  // Connect to Server 1 in a transaction

  tx.Complete()
}

当我执行嵌套事务时,它失败了:

代码语言:javascript
复制
using (TransactionScope tx = new TransactionScope())
{
  // Connect to Server 1 in a transaction

    using (TransactionScope tx2 = new TransactionScope())
    {
      // Connect to Server 2 in a transaction

      tx2.Complete()
    }

  tx.Complete()
}

我得到的错误是:

代码语言:javascript
复制
 The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B)

当我在服务器上运行相同的代码时,它可以工作。我在计算机上运行/配置了MSDTC (设置与服务器相同)。

我们的网络部门说,他们在防火墙上没有看到任何被阻止的流量。

我可以从我的计算机对服务器执行DTC Ping操作,但不能从服务器返回。

有什么想法吗?我认为这是一个网络问题,但需要一些帮助。

EN

回答 2

Stack Overflow用户

发布于 2012-11-30 01:05:21

I可以从我的计算机对服务器执行DTC Ping操作,但不能从服务器返回。

这似乎是原因所在。MSDTC要求两台机器都可以通过NetBios名称看到对方。您应该能够使用'nbtstat -a xxx.xxx‘解析IP来命名这两种方式。

此外,还必须在两台计算机上打开端口135。

票数 0
EN

Stack Overflow用户

发布于 2012-11-30 04:37:58

事实证明这是一个防火墙问题。谢谢。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13630867

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档