0

Hi I am having a simple worker service project in .net core 3.1. For one of the functionality i need to have distributed transaction. I referred the example described here.

I am not getting any compile time error, but getting run time error

this platform does not support distributed transactions

though its on Microsoft's site its not working. Is there any thing missing or additional Nuget package needs to be added? How can we achieve distributed transaction in .net core.

Thanks in advance.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
SidD
  • 5,697
  • 4
  • 18
  • 30
  • You must enable [DTC](https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/enable-network-dtc-access) – Max Nov 29 '21 at 19:07
  • 1
    .NET Core doesn't support Distributed Transactions because it would require a different transaction manager on each platform. Please have a look here: https://stackoverflow.com/questions/56328832/transactionscope-throwing-exception-this-platform-does-not-support-distributed-t – Sebastian Siemens Nov 29 '21 at 19:07
  • And to my knowledge it is not even solved in the current .NETT core version (5.0) - definitely one of the really really really weak points, sadly. – TomTom Nov 29 '21 at 19:20
  • @Max is probably correct if [multiple persistence resources are involved](https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/distributed-transactions). I would recommend reading all of that page plus [this page](https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/system-transactions-integration-with-sql-server) – Craig Selbert Nov 29 '21 at 21:51

0 Answers0