SqlTransaction 已完成;它再也无法使用。 返回
查询数据的时候,经常出现“ SqlTransaction 已完成;它再也无法使用”这个错误,但不是必然出现,跟传入的参数没什么关系,也没有频繁操作。
堆栈中的信息如下:
在 System.Data.SqlClient.SqlTransaction.ZombieCheck()
在 System.Data.SqlClient.SqlTransaction.Rollback()
在 SqlSugar.AdoProvider.RollbackTran()
在 SqlSugar.AdoProvider.UseTran(Action action, Action`1 errorCallBack)
在 SqlSugar.CodeFirstProvider.InitTables(Type entityType)
在 SqlSugar.CodeFirstProvider.InitTables(Type[] entityTypes)
在 SHSY.Web.Infrastructure.Core.BaseController.OnActionExecuting(ActionExecutingContext filterContext) 位置 E:\项目\09.数据中台\01.源码\server\ReaderService1\SHSY.API\Infrastructure\Core\BaseController.cs:行号 49
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__0(AsyncCallback asyncCallback, Object asyncState)
在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state)
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__0(AsyncCallback asyncCallback, Object asyncState)
热忱回答(1)
-
醉鱼 VIP0
2020/7/9我也遇到这种错误,使用的是Sql Server,请问有解决方案吗
0 回复