Ben McNiel
Ben McNiel

Reputation: 8801

System.InvalidOperationException: Transaction does not match connection. linq to sql

Any one ever seen this? It comes from a .net remoting endpoint hosted in IIS with a 16 process web garden. So there are many concurrent transactions in each thread pool per process. We are using linq to sql and the Transaction object that is from the DataContext, NOT the transactionScope object. It seems to happen either around the dispose for the connection or the dispose for the transaction after the commit.

Upvotes: 0

Views: 2659

Answers (1)

Ben McNiel
Ben McNiel

Reputation: 8801

I found the problem. This exception is throw after a Change Conflict has occurred with a linq object in the domain. Once the change conflict has been throw from datacontext.submitchanges, if you then attempt to rollback the transaction, the transaction.Rollback with throw the exception described above.

Upvotes: 2

Related Questions