Reputation: 176
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.
Edit:
I realized that exception throws when I try to open second connection in same database with in the same TransactionScope block.
post
Upvotes: 2
Views: 3790
Reputation: 3380
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.
Upvotes: 5