msdtc

Common Gotchas when using TransactionScope and MS DTC

亡梦爱人 提交于 2019-11-27 13:19:16
问题 I am just starting to work with using TransactionScope, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform. Some context on how I am going to be using transaction scopes: web application multiple web servers, application servers and sql servers transactions will be mainly database transactions but

How to share a connection between EF DbContext and AspNet Membership to avoid transactions escalating to DTC

痞子三分冷 提交于 2019-11-27 03:32:39
问题 I have an ASP.NET MVC3 application that uses an EF 4.1 DbContext, database-first data layer. The EDMX approach works fine as I tend to make changes to my data model before adapting the application to them. The application works fine with the special EF connection string that includes metadata references. However, there's one fly in the ointment. The application also uses ASP.NET membership and roles which require a standard connection string. I have several use cases that involve both the

MSDTC on server 'server is unavailable'

三世轮回 提交于 2019-11-26 19:56:08
问题 I get this weird error on SQL Server. And I cannot find solution in older posts. I have this procedure: create proc _upJM_SyncAll_test as begin DECLARE @SQLString nvarchar(max) set @SQLString = N' DELETE FROM OPENQUERY([LOCAL_MYSQL],''SELECT acSubject FROM _utjm_setitemprices'') where acSubject not in (select acSubject from _uvJM_SetSubj) DELETE FROM OPENQUERY([LOCAL_MYSQL],''SELECT acSubject FROM _utjm_setsubj'') where acSubject not in (select acSubject from _uvJM_SetSubj) update a set

How do I enable MSDTC on SQL Server?

巧了我就是萌 提交于 2019-11-26 18:26:30
Is this even a valid question? I have a .NET Windows app that is using MSTDC and it is throwing an exception: System.Transactions.TransactionManagerCommunicationException: 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 ---> System.Runtime.InteropServices.COMException (0x8004D024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024) at System.Transactions.Oletx

TransactionScope automatically escalating to MSDTC on some machines?

眉间皱痕 提交于 2019-11-26 01:20:28
问题 In our project we\'re using TransactionScope\'s to ensure our data access layer performs it\'s actions in a transaction. We\'re aiming to not require the MSDTC service to be enabled on our end-user\'s machines. Trouble is, on half of our developers machines, we can run with MSDTC disabled. The other half must have it enabled or they get the \"MSDTC on [SERVER] is unavailable\" error message. It\'s really got me scratching my head and has me seriously considering rolling back to a home-spun