Saturday, December 27, 2008

TransactionScope and DTC

When working with Rhino Service Bus, the application kept crashing as I hit the database. The exception message says that MSDTC is disabled. It turns out this is because of the tightened security on Windows XP SP2 and DTC services and the problem would manifest if your running your data acess services on a separate machine other than your DB  and instanciate a new transaction using TransactionScope in your services.

To solve the issue, first you need to check if DTC is properly configured. Do the following steps :

  • Go to “Control Panel” –> “Administrative Tools” –> “Component Services”
  • On the “Console Root” open the “Component Servcies” until you see “My Computer”
  • Right-Click “My Computer” node and select “Properties”
  • In “MSDTC” tab click “Security Configuration”
  • Make sure “Allow Remote Clients”, “Enable XA Transactions” and “Enable TIP Transactions” have check marks.

Try again to see if the problem is solved. If not, check if the firewall is blocking any calls to DTC by a utility called DTCPing.


Submit this story to DotNetKicks Shout it

No comments: