C# “烈火”;无法访问已释放的对象。对象名称:';SqlDelegatedTransaction'&引用;

C# “烈火”;无法访问已释放的对象。对象名称:';SqlDelegatedTransaction'&引用;,c#,asp.net-web-api,transactions,mono,hangfire,C#,Asp.net Web Api,Transactions,Mono,Hangfire,正在寻找有关Visual Studio Mac中HangFire的帮助。”这是一个在Windows/IIS上运行的WebAPI项目 在启动过程中,HangFire将被初始化。一旦发生这种情况,我们将尝试设置定期作业。当连接到Windows上的SQL Server 2014或Linux上的SQL Server 2019 CTP时,将引发异常 {System.Transactions.TransactionBortedException:事务失败-->System.ObjectDisposedEx

正在寻找有关Visual Studio Mac中HangFire的帮助。”这是一个在Windows/IIS上运行的WebAPI项目

在启动过程中,HangFire将被初始化。一旦发生这种情况,我们将尝试设置定期作业。当连接到Windows上的SQL Server 2014或Linux上的SQL Server 2019 CTP时,将引发异常


{System.Transactions.TransactionBortedException:事务失败-->System.ObjectDisposedException:无法访问已处置的对象。对象名称:'SqlDelegatedTransaction'。位于System.Data.SqlClient.SqlDelegatedTransaction.GetValidConnection()[0x0000a]…}

连接到Azure SQL时,它将返回

{System.NotImplementedException:未实现该方法或操作。在System.Transactions.Transaction.EnglistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification,System.Guid promoterType)处

已试用HangFire 1.6.8(适用于窗户)、1.6.14和1.6.21

调用
BackgroundJob.Enqueue
RecurringJob.AddOrUpdate
时引发错误

为了简化这一点,我将其实现为简单函数,而不是我们的函数,这也失败了

e、 g。

BackgroundJob.Enqueue(()=>Console.Write(“Enqueue”);


任何帮助都将不胜感激!

我找到了解决此问题的方法…我必须下载HangFire的源代码,添加项目作为参考,并将HangFire.SQLServer项目设置为不带“NETFULL”符号的编译