System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed.

Hi,

I am trying to open database connection two time within transaction scope in WCF Service. it is throwing exception System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed.

I have enabled MSDTC on client and server too.

I am using .Net Framework 3.0 RC1 Version and Sql-Server 2005 on windows XP.

This is throwing exception only when accessing database from other machine.

It is working fine on localhost.

Code Snippet as follows:

try

{

using (TransactionScope txScope = new TransactionScope())

{

using (SqlConnection conn1 = new SqlConnection(sqlConnectionString))

{

conn1.Open();

}

using (SqlConnection conn2 = new SqlConnection(sqlConnectionString))

{

conn2.Open();

}

}

}

catch (Exception ex)

{

Console.WriteLine(ex.Message.ToString());

}




Answer this question

System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed.

  • Emphyrio

    I did.

    I also disble firewall service from services to resolve this issue.

    I have tried all possible settings at client and server (both) to check all options.



  • johnny83

    Did you enabled "Network DTC Access" from the Control Panel (Add/Remove Programs -> Add/Remove Windows Features) Just a thought.

  • DevDiver

    One other thing that happened to us: We were trying to diagnose a problem and manually changed the login account for the DTC service in the Services control panel. We changed it to something like "network service", it didn't help, but when we changed it back everything else seemed to break. We ended up actually de-installing and reinstalling the DTC service which fixed things. There is a MSFT KB article explaining the process (KB:246679). Again, I'm just grasping at straws here.

  • System.Transactions.TransactionManagerCommunicationException: Communication with the underlying transaction manager has failed.