Why does my TransactionScope not work?

1

I have code that looks like this:

using (TransactionScope tsTransScope = new TransactionScope())
{
    bcAdvertiser.SaveToTraffic();
    bcAdvertiser.SaveToDb();

    tsTransScope.Complete();
}

The moment I do anything with the database, like open a connection, I get this error:

{System.Runtime.InteropServices.COMException (0x8004D01B): The Transaction Manager is not available. (Exception from HRESULT: 0x8004D01B) at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim) at System.Transactions.Oletx.DtcTransactionManager.Initialize()}

So I went into Component Service, right-clicked on My Computer, selected Properties, went into the MSDTC tab and the only thing I get is this:

enter image description here

I don't get the traditional dialog with Security options and all that. I tried switching to a remote MSDTC coordinator of the actual box where SQL Server is running (by click on the Select button), which is a Windows Server 2003 R2 box.

I also checked the setup on the remote box and all is good. This used to work on Windows 7, but now with Windows 8.1 update 1, it does not.

Am I missing something simple?

c#
.net
database
msdtc
asked on Stack Overflow May 2, 2014 by AngryHacker

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0