Search code examples
c#entity-frameworksql-server-expressmsdtc

MSDTC and Multiple Databases with Entity Framework


In my code I'm attempting to use a transaction using TransactionScope with Entity Framework. While in this transaction we are opening a regular SQL connection to a seperate server and database. When the conn.Open() is called we get an Error:

"Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Componet Services Administrative tool."

However, MSDTC is enabled and running on the Server.


Solution

  • 1) Just to be sure but have you really confirmed that DTC is running. Right mouse click on "My Computer" from your Component Services screen. The top menu item should say "Stop DTC".

    2) Have you checked that your configuration of MSDTC is the same on both ends (your application server that initiates connection to the database and at your database server)? Pay special attention to the Security Configurations under your MSTDC tab

    Good luck