We have an application here which is using postsharp to wrap certain methods within a transaction aspect derived from MethodInterceptionAspect. We use NHibernate 2.0 as an ORM for the application. There is a failure within this block of code,
public override void OnInvoke(MethodInterceptionArgs args)
{
using (TransactionScope transaction = CreateTransactionScope())
{
args.Proceed();
transaction.Complete();
}
}
that results in the following error: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) This only seems to happen for calls to save, and not delete or get calls.
I was wondering if anyone had encountered anything similar ever?