I have a WinForms / WCF / SQLServer app where I am trying to use MSDTC transactions like this:
using System.Transactions;
// ...
var transOptions =
new TransactionOptions
{
IsolationLevel = IsolationLevel.ReadCommitted,
Timeout = TimeSpan.FromSeconds(120)
};
using (var scope = new TransactionScope(TransactionScopeOption.Required,
transOptions))
{
// ...
if (everything_is_ok)
scope.Complete();
}
On my dev. box, where the server and client processes are on the same machine, it works fine. But when I deploy to the QA env, where server and client are on separate machines, whenever scope.Complete()
is called, the client hangs for the timeout period (2 minutes) and then I get:
The flowed transaction could not be unmarshaled. The following exception occurred: Communication with the underlying transaction manager has failed.
What can cause this?