.net标准类库-不支持分布式事务错误 [英] .net standard class library - not support Distributed Transaction error

查看:441
本文介绍了.net标准类库-不支持分布式事务错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.net标准类库项目中开发了日志记录服务。如果没有 System.Transaction (TransactionScope类),它可以完美地工作。

当我将事务添加到进程时,记录器插入方法将引发异常。
[此平台不支持分布式事务。]

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.]

当我使用System.Transaction将代码添加到核心控制台应用程序时, 。

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

.net标准是否不支持System.Transaction(TransactionScope)?

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

注意:
目前:.net核心和nuget是最新的。

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


  • 分发事务协调器服务正在运行,

  • EF核心版本:2.1.0 Preview2-final ,

  • 类库版本.NET Standard 2.0

  • AspNetCore 2.0.5

  • 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

编辑:


我意识到当我尝试在同一数据库中打开第二个连接时会抛出异常在同一TransactionScope区块中。
发布

推荐答案

您提到的错误消息指出此错误正在.NET Core上运行,并且您尝试使用/创建分布式事务。

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.

浏览代码在中进行操作CoreFx存储库。.NETCore似乎不支持分布式事务。

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

这篇关于.net标准类库-不支持分布式事务错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆