本文来自:http://www.cnblogs.com/loafer/archive/2010/06/03/TransactionScopeComplete.html
捕获异常的时候 经常会碰到这个异常报告
导致原因
//正确代码
using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
{
//xxx();
ts.Complete();
}
DoSomething();
//错误代码
using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
{
//xxx();
ts.Complete();
DoSomething();
}
主要是 在usingTransactionScope的ts.Complete();之后不要写任何代码