I am working with a piece of code that was developed at a time when our development environment was setup differently. It appears the code hasn't been actively developed since then and is no longer working in development.
Specifically, it is using two different DBContext
s (to different databases on the same server) within a TransactionScope
and triggering DTC to take over the transaction and then failing as soon as the second context attempts to make a query with the following error:
The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B)
This is between my local machine (Win10) and a machine on a different network and domain running SQL Server (Server 2012). The deployed application within the same network as the sql server works fine.
Things I have tried from google searches and other stack overflow:
SQLSTATE=24000,Native error=0,msg=[Microsoft][ODBC SQL Server Driver]Invalid cursor state
EnableAuthEpResolution
and RestrictRemoteClients
.I'm rather at a loss for the next steps of resolving this issue.
User contributions licensed under CC BY-SA 3.0