Attempt to load Oracle client libraries threw BadImageFormatException
Environment
Product Version | 6.2.20.916 |
Product | Progress® Telerik® Report Server |
Description
A Report runs fine from the web interface of the Report Server. The same report throws the following error when being run on a schedule from the Report Server: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64-bit mode with the 32-bit Oracle client components installed. The error occurs after an upgrade to the latest version of the Telerik Report Server software.
Error Message
Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64-bit mode with the 32-bit Oracle client components installed.
Possible Cause
The Oracle client utilized to connect to the database is 32-bit, whereas the Report Server Service Agent is running in 64-bit mode. Starting with the 2019 R2 SP1 release, the Service Agent is indeed running as a 64-bit service by default. Telerik did this change to avoid issues related to insufficient memory. For more information, see Memory Limits for Windows and Windows Server.
Solution
Configure the Service Agent to run in 32-bit mode. See the Forcing a .Net Windows service to run as 32-bit on a 64-bit machine Stackoverflow thread for details.
See Also
BadImageFormatException or Architecture Mismatch message when using ODBC connection