0

I am trying to troubleshoot an issue with a seemingly distributed transaction:

Exception Message: Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. Other Error:

System.Data.SqlClient.SqlException (0x80131904): Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Objects.ObjectContext.ExecuteStoreCommand(String commandText, Object[] parameters) at System.Data.Entity.Internal.InternalContext.ExecuteSqlCommand(String sql, Object[] parameters) at System.Data.Entity.Database.ExecuteSqlCommand(String sql, Object[] parameters) at monk360.Data.Helpers.ChangeTrackingHelper.RecordUserConnection(DbContext context, String userName) in d:\bld\9\117\Sources\Source\WEB\Source\monk360.Data\Helpers\ChangeTrackingHelper.cs:line 58

Please pay close attention to the last line above:

d:\bld\9\117\Sources\Source\WEB\Source\monk360.Data\Helpers\ChangeTrackingHelper.cs:line 58

If we look at the code it shows that lien 58 is just a blank line with no code:

enter image description here

What does it mean when the stack trace points to a line with no code?

Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062

1 Answers1

0

it means your code is out of sync. Clean>Rebuild then run again. You may have to restart VS as well.

chris-crush-code
  • 1,114
  • 2
  • 8
  • 17