Now the thing is, i’d either expect DTC to fail outright or to just work. But it shouldn’t fail in one situation, and work in another. On my machine, it failed in the following situation (which i’ll further refer to as Situation A):
1. open a transaction scope
2. open an nhibernate session
3. hit the db
4. publish a message through nservicebus
5. close the nhibernate session
6. complete and close the transaction scope
Step 4 and 5 could be switched around but it didn’t make a difference. In Situation A, i always got a TransactionManagerCommunicationException with the following message:
Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool.
Everyone who’s worked with MSDTC before probably knows that exception since it usually takes some fiddling with the settings to make things work. The thing is, i was pretty sure that my settings, as well as the ones on the database server were correct. Unfortunately, DTCPing didn’t confirm that since that too failed.
Read more: The Inquisitive Coder – Davy Brion's Blog