paul henry

paul henry

  • NA
  • 1
  • 0

communication with the underlying transaction manager has failed (MSDTC)

Mar 8 2010 4:20 AM
Hello to all i am using TransactionScope in my BusinessLogic Layer if the sql server and the application is in same computer
it is running smoothly but if the database is in different machine its always fails with the message
"communication with the underlying transaction manager has failed"

i'd already set the msdtc network access then my latest bug is "communication with the underlying transaction manager has failed"


i'm using
visual studio 2008 c# windows application on windows xp sp2 (development pc)
sqlserver 2005 express edition at windows 2003 sp1 (server pc)

here is my sample code:

using (TransactionScope myTransactionScope = new TransactionScope())
            {
                //audit update
                if (myCategory.mId != 0)
                    AuditUpdate(myCategory);

                int id = CategoryDB.Save(myCategory);

                //audit insert
                if (myCategory.mId == 0)
                    AuditInsert(myCategory, id);

                //  Assign the Category its new (or existing ID).
                myCategory.mId = id;

                myTransactionScope.Complete();

                return id;
            }