Attempt to load Oracle client libraries threw BadImageFormatException.
-
2012年7月18日 12:28
Hi
When i am using windowes console Application its running fine.but when using webapp its geeting error.
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.
Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Share Point Application Developer,TCS
全部回复
-
2012年7月18日 14:33
32 bit assemblies and dll's cannot be loaded into a 64 bit process and vice versa. You can create assemblies that are "AnyCPU" and those can be loaded into both 64 bit processes and 32 bit processes. Since teh Oracle assemblies are 32 bit, they can only be loaded into a 32 bit process.
A console app project is by default configured to run in x86 or 32 bit mode. A web application is by default configured in anycpu mode and can thus be loaded into both 64 bit and 32 bit processes.
Either install the 64 bit version of the Orcale client or configure IIS to run in a 32-bit process.
IIS7: http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
My blog: blog.jessehouwing.nl
- 已建议为答案 Jesse HouwingMicrosoft Community Contributor 2012年7月24日 11:57
- 已标记为答案 Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator 2012年7月25日 10:24

