Note that there are some explanatory texts on larger screens.

plurals
  1. POSystem.Transactions.TransactionException: The transaction has already been implicitly or explicitly committed or aborted
    primarykey
    data
    text
    <p>I have the following code:</p> <pre><code>private void MigrateInTrackingChannelsDbTable(Guid toSsoId, string ctid) { Database database = DatabaseFactory.CreateDatabase("TrackingChannels"); try { using (DbCommand command = database.GetStoredProcCommand("usp_TrackingChannels_MigrateToolbar")) { database.AddInParameter(command, "@ToSSOId", DbType.Guid, toSsoId); database.AddInParameter(command, "@CTID", DbType.String, ctid); database.ExecuteNonQuery(command); } } catch (Exception ex) { Log.Application.Error( string.Format("CPUserService: MigrateInTrackingChannelsDbTable failed with toSsoId:{0}, ctid:{1}", toSsoId, ctid), ex); throw; } } </code></pre> <p>but get the following error:</p> <blockquote> <p>System.Transactions.TransactionException: The transaction has already been implicitly or explicitly committed or aborted. System.Runtime.InteropServices.COMException: The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E) ErrorCode = -2147168242 App Domain: /LM/W3SVC/819313558/Root/ToolbarBackOffice-2-129804733861185000 Level: Error Logger: application Thread Id: 1 Error Message: Migration from: efrat96811@edokleinman.com to efrat98545@edokleinman.com faild , session from: efrat96811@edokleinman.com Source:</p> <p>TransactionException: The transaction has already been implicitly or explicitly committed or aborted. AT: at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) at System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction transaction, Byte[] whereAbouts) at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection() in D:\Conduit\RnD\Server\Core\Dev\Microsoft.Practices.EnterpriseLibrary.Data\Database.cs:line 1168 at Microsoft.Practices.EnterpriseLibrary.Data.TransactionScopeConnections.GetConnection(Database db) in D:\Conduit\RnD\Server\Core\Dev\Microsoft.Practices.EnterpriseLibrary.Data\TransactionScopeConnections.cs:line 68 at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection) in D:\Conduit\RnD\Server\Core\Dev\Microsoft.Practices.EnterpriseLibrary.Data\Database.cs:line 1194 at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command) in D:\Conduit\RnD\Server\Core\Dev\Microsoft.Practices.EnterpriseLibrary.Data\Database.cs:line 690 at CPUserInfrastructure.Services.CPUserService.MigrateInTrackingChannelsDbTable(Guid toSsoId, String ctid) in D:\Conduit\RnD\Server\Services\CPInfrastructure\CPUserInfrastructure\CPUserInfrastructure\Services\CPUserService.cs:line 772 at CPUserInfrastructure.Services.CPUserService.&lt;>c_<em>DisplayClass8.b</em>_7() in D:\Conduit\RnD\Server\Services\CPInfrastructure\CPUserInfrastructure\CPUserInfrastructure\Services\CPUserService.cs:line 386 at CPInfrastructure.Helpers.TransactionHelpers.RunInTransaction(Action logic) in D:\Conduit\RnD\Server\Services\CPInfrastructure\CPInfrastructure-Dev\Helpers\TransactionHelpers.cs:line 17 at CPUserInfrastructure.Services.CPUserService.MigrateCPuserToolbar(Guid toSsoId, String ctid) in D:\Conduit\RnD\Server\Services\CPInfrastructure\CPUserInfrastructure\CPUserInfrastructure\Services\CPUserService.cs:line 390 at BrandToolbar.Admin.ToolbarBackOffice.Toolbar.AccountsManagement.btnMTMigrate_Click(Object sender, EventArgs e) in D:\Conduit\RnD\Server\WebSites\Writers\Dev-Accounts-4.0\AdminServices\Admin.Toolbar\Integration\BrandToolbar.Admin.ToolbarBackOffice\Toolbar\AccountsManagement.aspx.cs:line 142</p> <p>COMException: The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E) AT: at System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32&amp; cookieIndex, UInt32&amp; cookieSize, CoTaskMemHandle&amp; cookieBuffer) at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload