Reputation: 38704
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?
Upvotes: 7
Views: 30958
Reputation: 22652
I had similar issue and it got resolved when the administrator set MaxUserPort
registry key value as 65534. [The issue happened in a clustered server setup only]
REFERENCES
Other References
Upvotes: 2
Reputation: 683
As a further note on MSDTC, see what the Security configuration tab for MSDTC has set on the server, and make sure your local machine matches that. I ran into a problem that stumped me for a while until I did this, and found that the server expected no authentication, but my local machine was set for mutual authentication.
Upvotes: 1
Reputation: 1014
I spent few hours today trying to resolve this problem under Windows 7. Finally it worked, here's what I did:
This is maybe not the best solution but in fact the only one that worked in my case.
EDIT: After another issue with MSDTC under Windows 7 SP1 I found out that there are two things you need to do in order to make it work.
Upvotes: 10
Reputation: 44605
you should enabled network transactions and other settings for distributed transactions in the DTC configuration.
Check this out, the answer flagged with the green icon tells you what to do in details:
"Communication with the underlying transaction manager has failed" error message
Upvotes: 0