.net standard class library - not support Distributed Transaction error

.net-standard asp.net-core c# class-library entity-framework-core

Question

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
2
5/6/2018 6:54:15 PM

Popular Answer

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.

4
5/4/2018 9:57:34 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow