查询状态嵌套事务错误



我有以下错误:

Invalid object name 'aspstate.dbo.ASPStateTempSessions'.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 238, current count = 239. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

有人知道如何解决这个问题吗?

我发现了异常的原因:http://msmvps.com/blogs/greglow/archive/2007/02/04/improving-asp-net-session-state-database-performance-by-reducing-blocking.aspx

有两个错误

  1. 无效的对象名称'aspstate.dbo.ASPStateTempSessions'.
  2. EXECUTE后的事务计数表示不匹配的数量

BEGIN/COMMIT不匹配是由于运行时编译失败导致的,因为aspstate.dbo.ASPStateTempSessions表缺失。

所以一个额外的BEGIN被执行,但是它没有到达COMMIT。

如果@@TRANCOUNT是238,可能是有人在执行238次后删除了这个表

从表面上看,您已经打开了开始语句。需要用commit语句或End语句结束。似乎是发生在另一边的web服务调用,你做

最新更新