0

Have a IHttpModule setup to open and close, begin and commit NH isession and transaction etc. Have a piece of code in a ASHX handler similar to this, that is called by some ajax:

using (var transactionScope = new TransactionScope(...)) {
   // Do some NH stuff and write to a few transactional queues.
   transactionScope.Complete();
}

Am facing the following error and having a few issues resolving it: This SqlTransaction has completed; it is no longer usable.Commit failed.

Can anyone shed any light as to why this might be the case. To my knowledge, the NH transaction enlists in the TransactionScope, although the TranasctionScope is being created after the IHttpModule BeginRequest, that created the ISession.

Any help would be appreciated.

TheITGuy
  • 722
  • 4
  • 15

1 Answers1

0

Well... after several hours... it turned out my Distributed Transaction Coordinator was causing my issues...

A restart of it and it returned to normal...

Hope this helps somebody else.

TheITGuy
  • 722
  • 4
  • 15