The transaction has already been implicitly or explicitly committed or aborted

Last post 12-18-2007 12:21 PM by Erich Eichinger. 9 replies.

Sort Posts:

  • The transaction has already been implicitly or explicitly committed or aborted

    08-14-2006, 12:43 PM
    • Loading...
    • Nola3Nut
    • Joined on 08-03-2006, 9:35 PM
    • Posts 61

    Why does this error happen when I try to insert a new message?

     

     

    Server Error in '/LMBlinq' Application.

    The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)

    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.

    Exception Details: System.Runtime.InteropServices.COMException: The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)

    Source Error:

    Line 31:       LawMessage db = CreateDataContext();
    Line 32:       db.Messages.Add(x);
    Line 33:       db.SubmitChanges();
    Line 34:       return 1;
    Line 35:     }

    Source File: c:\LMBlinq\NewMessage.aspx.cs    Line: 33

    Stack Trace:

    [COMException (0x8004d00e): The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)]
       System.Transactions.Oletx.ITransactionShim.Export(UInt32 whereaboutsSize, Byte[] whereabouts, Int32& cookieIndex, UInt32& cookieSize, CoTaskMemHandle& cookieBuffer) +0
       System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) +211
    
    [TransactionException: The transaction has already been implicitly or explicitly committed or aborted.]
       System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) +326
       System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) +266
       System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) +379
       System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx) +50
       System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction) +47
       System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction) +28
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1242
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89
       System.Data.SqlClient.SqlConnection.Open() +159
       System.Data.DLinq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user) +38
       System.Data.DLinq.SqlClient.SqlContext.get_IsServer2KOrEarlier() +31
       System.Data.DLinq.SqlClient.SqlContext.Execute(Expression query) +351
       System.Data.DLinq.SimpleChangeDirector.ExecuteInsert(TrackedObject item, StringBuilder changeText) +147
       System.Data.DLinq.SimpleChangeDirector.Insert(TrackedObject item) +95
       System.Data.DLinq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) +234
       System.Data.DLinq.DataContext.SubmitChanges(ConflictMode failureMode) +211
       System.Data.DLinq.DataContext.SubmitChanges() +6
       NewMessagePage.Insert(Message x) in c:\LMBlinq\NewMessage.aspx.cs:33
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
       Microsoft.Web.UI.Controls.PageDataSourceView.InvokeMethod(PageDataSourceMethod method) +157
       Microsoft.Web.UI.Controls.PageDataSourceView.ExecuteInsert(IDictionary values) +454
       System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +68
       System.Web.UI.WebControls.DetailsView.HandleInsert(String commandArg, Boolean causesValidation) +392
       System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +609
       System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +88
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
       System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +109
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +86
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4917
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

  • Re: The transaction has already been implicitly or explicitly committed or aborted

    08-14-2006, 9:37 PM
    Answer
    • Loading...
    • phuff
    • Joined on 06-11-2002, 12:39 PM
    • Redmond, WA
    • Posts 547
    • AspNetTeam
    LINQ must be configured to use transactions for updates, deletes, and insertions. Change the connection string in the Web.config file to include the attribute enlist=false.
    Polita Paulus

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: The transaction has already been implicitly or explicitly committed or aborted

    08-16-2006, 6:24 PM
    • Loading...
    • Nola3Nut
    • Joined on 08-03-2006, 9:35 PM
    • Posts 61

    Thank you Polita.  You are a freakin genius.  Seriously.  In the future, scientists will be examing your brain.  Blinq is really freaky-deaky.  Its like that commercial for ask.com where people actually start using tools for the first time and the monkey says, "I'm hungry".  Well maybe its not like that, but its like making a car in a factory, rather than by hand.. yea that's a good one.. well probably not but you get the idea.  Oh yea, I wanted to ask.. did you hit your head on a sink when you came up with this idea?  If so, I'm going to go hit my head on a sink so I can be smart.

     

     

  • Re: The transaction has already been implicitly or explicitly committed or aborted

    08-16-2006, 6:39 PM
    • Loading...
    • phuff
    • Joined on 06-11-2002, 12:39 PM
    • Redmond, WA
    • Posts 547
    • AspNetTeam
    Wow- thanks, Nola3Nut.  But really, I'm not that smart.  You know what they say about a million monkeys at typewriters.
    Polita Paulus

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: The transaction has already been implicitly or explicitly committed or aborted

    03-28-2007, 4:22 PM
    • Loading...
    • jbatte
    • Joined on 03-28-2007, 8:20 PM
    • Posts 1
    Oh yes you are.  I could have potentially spent hours tweaking MSDTC settings on the server, and trying to register the transaction in Enterprise Services, but I stumbled onto your advice and now I'm working again.  Go hug yourself.  Or better yet, tell some beautiful woman how much you just helped me and get her to hug you.
  • Re: The transaction has already been implicitly or explicitly committed or aborted

    03-29-2007, 5:53 PM
    • Loading...
    • phuff
    • Joined on 06-11-2002, 12:39 PM
    • Redmond, WA
    • Posts 547
    • AspNetTeam
    Heh heh... You know I'm a girl, right? :)
    Polita Paulus

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: The transaction has already been implicitly or explicitly committed or aborted

    05-16-2007, 5:33 PM
    • Loading...
    • TheDaveO1
    • Joined on 05-16-2007, 9:24 PM
    • Vancouver, BC
    • Posts 1

    I had to read this thread to the rest of my developmen team.  We all laughed hard.  Our industry doesn't have any gender stereotypes, does it? Smile

    Oh, and your suggested solution does seem to have solved my problem too.  Feel free to find yourself a nice gentleman programmer and tell recount this thread to him and he'll probably at least laugh, and hey, that's a good start!

  • Re: The transaction has already been implicitly or explicitly committed or aborted

    06-12-2007, 11:43 AM
    • Loading...
    • bayoujosh
    • Joined on 06-12-2007, 3:41 PM
    • Posts 1

    Thanks so much for this answer. I just hit this this morning, and instead of wasting hours trying to fix it, I'm back working already. Very funny post too! 

  • Re: The transaction has already been implicitly or explicitly committed or aborted

    08-01-2007, 10:08 AM
    • Loading...
    • dhina.techno
    • Joined on 07-29-2007, 2:37 PM
    • Mysore
    • Posts 11

    Hi Polita,

        I guess, you have an answer for each and everything. Thank you so much for the wonderful tool you provided us. Its all a kind of magic to me.. though!Big Smile . I was stumbling across the posts to find a solution for the error one which is above. I was indeed very much convinced by seeing your reply as you will hit the query with the correct answer. By the way,  tomorrow i am planning a session on BLINQ to my team mates. wish me!

    Thanks.
     

    dhinaG
  • Re: The transaction has already been implicitly or explicitly committed or aborted

    12-18-2007, 12:21 PM

    Hi all, 

    just turning off transaction enlistment might be dangerous and does only cure the symptoms but not the cause.

    Other possible causes of the error above are an active Firewall. See this thread here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=168911&SiteID=1 

    In some cases it helps to select "No Authentication Required" on the "security configuration" tab of the MSDTC settings dialog.

    cheers,
    Erich

     

Page 1 of 1 (10 items)
Microsoft Communities
Page view counter