Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 27, 2013 04:02 AM by Pengzhen Song - MSFT
Feb 26, 2013 05:26 AM|LINK
Hi, when I create Web Application (ASP.NET Forms) project from the start and setting
Propertities -> Build -> Platform Target : x64
I have such exception:
System.BadImageFormatException: Could not load file or assembly 'WebApplication_X64' or one of its dependencies. An attempt was made to load a program with an incorrect format.
If I use х86 or Any CPU everything is working fine.
Exception has a place in this configuration also: MS Visual Studio 2010 Ultimate on Windows 7, MS Visual Studio 2012 on Windows 8.
The compiled 'dll' has to be exactly the 64-bit, because the database connection driver (IBM INFORMIX ODBC DRIVER 64-bit) throw exception: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch
between the Driver and Application.
In case 64-bit Windows Forms everything is working fine.
Could you possibly help me to solve this problem? Thank you in advance.
Feb 26, 2013 12:17 PM|LINK
Feb 27, 2013 04:02 AM|LINK
You are using 64-bit odbcad32.exe to configure a DSN that connects to a 32-bit driver.
Use the 32-bit odbcad32.exe to configure the DSN.
For detailed information, you can refer here
Hope it can help you.