I am trying to connect with database like
var ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connStringName"].ConnectionString;
DbCommand dbCommand = db.GetStoredProcCommand("CorrectProcedureName");
using (IDataReader dataReader = db.ExecuteReader(dbCommand))
{
...
}
When trying the exception is thrown with message:
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)"} System.Exception {System.Runtime.InteropServices.COMException}
What I have tried:
"Two machines cannot find each other" - I have tried to connect server by IPv6: it works (I mean: the same exception is thrown as opposed to other random IP's which are totally unaccessible (which is correct because there are no such servers)
"Support for network transactions..." - it is enabled on both machines, checked with administrator
"Firewall is present" - it's not, it's totally disabled
Distributed Transaction Coordinator service is started
The difference between my solution and any examples may be that I have another database connected in the same program (I need 2 dbs at once).
Do you have any idea why it may happen in this case?
User contributions licensed under CC BY-SA 3.0