title: NHibernate with ASHX and TransactionScope
body: <p>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:</p>
  
  <pre><code>using (var transactionScope = new TransactionScope(...)) {
     // Do some NH stuff and write to a few transactional queues.
     transactionScope.Complete();
  }
  </code></pre>
  
  <p>Am facing the following error and having a few issues resolving it:
  This SqlTransaction has completed; it is no longer usable.Commit failed.</p>
  
  <p>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.</p>
  
  <p>Any help would be appreciated.</p>