我试图解决一个看似分布式的事务的问题:
异常消息:已完成分布式事务。要么将此会话登记在新事务中,要么将该会话登记为空事务。其他错误: System.Data.SqlClient.SqlException (0x80131904):完成分布式事务。要么将此会话登记在新事务中,要么将该会话登记为空事务。在System.Data.SqlClient.SqlConnection.OnError(SqlException异常下,System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj中的布尔breakConnection、操作
1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction、System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior、SqlCommand cmdHandler、SqlDataReader dataStream、BulkCopySimpleResultSet dataStream、BulkCopySimpleResultSet cmdHandler、Boolean )(en21#、布尔异步、超时、布尔)在en4#完成时、String,(布尔值,Int32超时值,布尔值( System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Objects.ObjectContext.ExecuteStoreCommand(String commandText ),Object[]参数( Object[]参数)在System.Data.Entity.Internal.InternalContext.ExecuteSqlCommand(String sql,Object[]参数(在System.Data.Entity.Database.ExecuteSqlCommand(String sql,Object[]参数)在monk360.Data.Helpers.ChangeTrackingHelper.RecordUserConnection(DbContext上下文中),d:\bld\9\117\Sources\Source\WEB\Source\monk360.Data\Helpers\ChangeTrackingHelper.cs:line 58中的字符串userName)
请密切注意上面最后一行:
d:\bld\9\117\Sources\Source\WEB\Source\monk360.Data\Helpers\ChangeTrackingHelper.cs:line 58
如果我们看一下代码,就会发现lien 58只是一个空行,没有代码:

,当堆栈跟踪指向没有代码的行时,意味着什么?
发布于 2017-05-12 18:13:57
这意味着你的代码不同步。然后再次运行Clean>Rebuild。您可能还必须重新启动VS。
https://stackoverflow.com/questions/43944062
复制相似问题