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?
Yes, I've encountered this. Usually its a 64/32 bit problem. Check the target in your project settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With