Message:此 SqlTransaction 已完成;它再也无法使用。;StackTrace: 在 System.Data.SqlClient.SqlTransaction.ZombieCheck()
在 System.Data.SqlClient.SqlTransaction.Rollback()
在 Kingdee.BOS.App.Data.Sql.SqlDatabase.CopyDataToDestination(DbCommand cmd, DataTable table)
在 Kingdee.BOS.App.Data.Sql.SqlDatabase.BulkInserts(DbCommand cmd, DataTable dt)
在 Kingdee.BOS.App.Data.DBUtils.BulkInserts(Context ctx, String InsertstrSql, String CreateSql, DataTable dt)
在 Kingdee.BOS.App.Data.DBUtils.BulkInserts(Context ctx, DataTable dt)
在 Kingdee.K3.FIN.HS.App.Core.OutStockAcctg.Object.StockBillData.InsertOutInStockSeq(Context ctx, OutStockAcctgParameters acctgParameters)
在 Kingdee.K3.FIN.HS.App.Core.OutStcokCostAcctg.GetOutInStockAcctgData(Context ctx, OutStockAcctgParameters acctgParameters)
在 Kingdee.K3.FIN.HS.App.Core.OutStcokCostAcctg.GetBillData(Context ctx, OutStockAcctgParameters acctgParameters, AbstractOutStockAcctgPlugInProxy plugInProxy)
在 Kingdee.K3.FIN.HS.App.Core.OutStcokCostAcctg.BeforeOutStockAcctg(Context ctx, OutStockAcctgParameters acctgParameters)
在 Kingdee.K3.FIN.App.Core.OutAcctg.AbstractAcctgService.BeforeExecution[T](Context ctx, T acctgParameters)
在 Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.AcctgBefore[T,K](Context ctx, T acctgParameters, Dictionary`2 services, CostCalType calType)
在 Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.ExecutionCostCal(IExtendServiceProvider serviceProvider, Dictionary`2 calservice)
在 Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.CostCal(ComputeContext ctx, IExtendServiceProvider serviceProvider)
在 Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencilService.CostAcctg(ComputeContext ctx, OutStockAcctgParameters acctgParameters)
处理方法:
连接超时时间:
webconfig的appsettings中增加项:
<add key="DbCommandTimeout" value="900" />
事务超时时间:
machine.config(默认应该在C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config中),比如设置为1个小时:
<system.transactions>
<machineSettings maxTimeout="01:00:00" />
</system.transactions>
需要注意的是,system.transactions应该放在configSections节点之后,否则程序启动时会报“无法识别的配置节 system.transactions”。