.net standard class library - not support Distributed Transaction error

て烟熏妆下的殇ゞ 提交于 2020-01-24 15:29:06

问题


I developed a logging service in .net standard class library project. It is perfectly working without System.Transaction (TransactionScope class).
When I add transaction to a process, logger insert method throws an exception. [This platform does not support distributed transactions.]

When I add code to core console app with System.Transaction it works.

Is .net standard not supporting System.Transaction(TransactionScope)?

NOTE: For now : .net core and nugets are lastest.

  • Distribution Transaction Coordinator service is working,
  • EF Core version: 2.1.0 preview2-final,
  • Class library versions .NET Standard 2.0
  • AspNetCore 2.0.5

Edit:
I realized that exception throws when I try to open second connection in same database with in the same TransactionScope block. post


回答1:


The error message you are mentioning points to this is running on .NET Core and that you are trying to use/create a Distributed Transaction.

Browsing the code for DistributedTransaction in the CoreFx repo it looks like Distributed Transactions are not supported on .NET Core.



来源:https://stackoverflow.com/questions/50177520/net-standard-class-library-not-support-distributed-transaction-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!