title | description | type | page_title | slug | tags | res_type |
---|---|---|---|---|---|---|
BadImageFormatException or Architecture Mismatch message when using ODBC connection |
Rendering a report that uses ODBC connection, throws BadImageFormatException or shows "The specified DSN contains an architecture mismatch between the driver and the application" error message |
troubleshooting |
BadImageFormatException or Architecture Mismatch message when using ODBC connection |
badimageformatrxception-or-architecture-mismatch-message-when-using-odbc-connection |
oracle,odbc |
kb |
Product | Progress® Telerik® Report Server |
Operating System | Windows |
.Net framework | Version 4.6 |
When the Report Server application is running in 32-bit application pool and opens an ODBC connection that uses a 64-bit driver, ODBC Driver Manager throws either a BadImageFormatException (reproduced with Oracle driver) or shows "The specified DSN contains an architecture mismatch between the driver and the application" error message (reproduced with Progress® OpenEdge® driver). The same is valid also if the Report Server is running in 64-bit application pool and ODBC uses a 32-bit driver.
If the correct version of database drivers is installed, then the Report Server's application pool should be set to run in different mode (32 or 64-bit). Report Server's application pool settings define it as a 32-bit application by default. To change it, navigate to the Report Server's application pool, open its Advanced Settings form and look for a Enable 32-bit Applications property. Change it to False to run the Report Server instance in 64-bit mode and recycle the pool.