1

次のコードがあります。

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;
    }
}

しかし、次のエラーが発生します。

System.Transactions.TransactionException: トランザクションは既に暗黙的または明示的にコミットまたは中止されています。System.Runtime.InteropServices.COMException: トランザクションは既に暗黙的または明示的にコミットまたは中止されています (HRESULT からの例外: 0x8004D00E) ErrorCode = -2147168242 アプリ ドメイン: /LM/W3SVC/819313558/Root/ToolbarBackOffice-2-129804733861185000 レベル: エラーロガー: アプリケーション スレッド ID: 1 エラー メッセージ: 移行元: efrat96811@edokleinman.com から efrat98545@edokleinman.com への移行に失敗しました。セッション元: efrat96811@edokleinman.com ソース:

TransactionException: トランザクションは既に暗黙的または明示的にコミットまたは中止されています。AT: System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) で System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) で System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction transaction, Byte[] whereAbouts) で System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) で System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(トランザクション トランザクション) で System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) で System.Data.ProviderBase System.Data.ProviderBase.DbConnectionClosed での .DbConnectionFactory.GetConnection(DbConnection owningConnection)。DisplayClass8.bD:\Conduit\RnD\Server\Services\CPInfrastructure\CPUserInfrastructure\CPUserInfrastructure\Services\CPUserService.cs の _7(): D:\Conduit\RnD\Server の CPInfrastructure.Helpers.TransactionHelpers.RunInTransaction(Action logic) の 386 行目\Services\CPInfrastructure\CPInfrastructure-Dev\Helpers\TransactionHelpers.cs: D:\Conduit\RnD\Server\Services\CPInfrastructure\CPUserInfrastructure\CPUserInfrastructure\ の CPUserInfrastructure.Services.CPUserService.MigrateCPuserToolbar(Guid toSsoId, String ctid) の 17 行目Services\CPUserService.cs: D:\Conduit\RnD\Server\WebSites\Writers\Dev-Accounts-4.0\AdminServices\Admin の BrandToolbar.Admin.ToolbarBackOffice.Toolbar.AccountsManagement.btnMTMigrate_Click(オブジェクト送信者、EventArgs e) の 390 行目.Toolbar\Integration\BrandToolbar.Admin.ToolbarBackOffice\Toolbar\AccountsManagement.aspx.cs:142行目

COMException: トランザクションは既に暗黙的または明示的にコミットまたは中止されています (HRESULT からの例外: 0x8004D00E) AT: System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32& cookieIndex, UInt32& cookieSize, CoTaskMemHandle& cookieBuffer) でSystem.Transactions.TransactionInterop.GetExportCookie (トランザクション トランザクション、Byte[] の所在) で

4

0 に答える 0