views:

71

answers:

3

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.

+1  A: 

You'll need to enable MS DTC on both the web server, and the SQL Server, as well as enable remote transactions on both machines. I've got walk throughs for Windows 2003 and Windows 2008 up on my blog.

mrdenny
A: 

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

Syd
Although Both SQL Servers were enabled, the Security Configurations under the MSDTC Tab were not enabled for Network Transactions, once we got that it was just opening up the port and it worked!
Patrick
A: 

Check also firewall. I once, lost a whole day in office, for discovering that the Windows Update operation, that had run the previous night, restored the default values of Windows Firewall.

Aggelos Mpimpoudis