In my application I use the following pattern for calling the DB: //do a transactionusing (TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required)){ OperationOnDb1(); //when we open the connection to the "other db" in this call, the transaction would become distributed OperationOnDb2(); //transaction is now distributed transaction.Complete();}The problem is that Operation1 and Operation2 90% of the time use the same db ... but there are cases (bugs) when they use two DBs. I want to get an exception if the transaction becomes distributed.How can I detect if the transaction is promoted to a distributed transaction?Thanks, Radu 解决方案 You can also have a look at the following eventTransactionManager.DistributedTransactionStarted Event 这篇关于.net 检测分布式事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!