March 26th, 2012, 11:10 AM
WCF Service Error Bad Image Format Exception on x86
I am getting an error Bad Image Format Exception when i change the Platform Target to x86 from Any CPU.
It doesn't throw an exception when running on "Any CPU" as Platform Target.
My OS is Win 7 x64. I figured out that as 64-bit framework being used, it is throwing the exception.
"LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config."
Now the problem is i am using Sybase database and i have a 32-bit dll and not x64.
So if "Any CPU" is selected and i run the service, i am getting exception for memory location just while i create a connection object.
AseConnection oAseCon = new AseConnection(str);
Is there a solution that i can run a 3rd party 32-bit dll in a WCF Service on 64 bit machine.
Help would be appreciated.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.