Oracle ODP.Net 在Windows Server 2008 x64 中的调用问题解决方案

错误现象:
Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

原因:
o 32-bit ODP.NET installed on 64-bit o/s
o .NET application compiled with either "Any CPU" or "x64" set for the "Platform target"
o The application is then deployed to the 64-bit host with the 32-bit ODP.NET installed
o The application executes as a 64-bit application but tries to load the 32-bit ODP.NET, thus the exception

解决方法
1. 下载Oracle Database 11g Release 1 Client (11.1.0.7.0) for Microsoft Windows 2008 Server (32-bit)
2. Go to IIS manager and change the application pool setting that will "Enable 32-Bit Applications",即设置该应用程序的32位兼容性。

解决方法原文出处:http://blogs.oracle.com/MingMan/2008/09/oracledataaccessdll_in_windows.html
posted @ 2009-10-13 16:57  cubean  阅读(1045)  评论(0编辑  收藏  举报