【发布时间】:2016-11-03 13:15:07
【问题描述】:
我的应用程序部署在 2 个 Windows azure 虚拟机上。一台机器用于 sql server,另一台用于应用程序。
在应用程序中,我使用的是TransactionScope。所以我在两个虚拟机上都应用了事务的配置,如下图所示。
另外,我在两台机器的防火墙中都允许了分布式事务协调器。
我有一个长时间运行的进程,它有一个循环,在每个循环内我都有一个单独的TransactionScope。有时,并非总是如此,我会遇到以下异常。
Communication with the underlying transaction manager has failed. ------- Inner Exception: 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.
两台虚拟机都安装了“System Center Endpoint Protection”,我关闭了实时保护也没有结果。
我尝试在 sql VM 上运行该进程,一切正常,无一例外。
【问题讨论】:
-
在这里查看我的答案:stackoverflow.com/questions/42115390/…
标签: azure transactionscope msdtc