在10g IIS服务器环境中部署odp.net 11g应用程序
我使用 oracle 11gR2 客户端开发了一个 C# 3.5 Mvc 1.0 应用程序,该客户端使用 odp .net 2.112.1.0。我想将其部署在我的 IIS7 服务器中,该服务器具有使用 odp.net 2.102.2.20 的 oracle 客户端 10g 。我收到以下错误
无法加载文件或程序集 'Oracle.DataAccess,版本=2.112.1.0, 文化=中立, PublicKeyToken=89b483f429c47342' 或 它的依赖项之一。系统 找不到指定的文件。
我尝试将 11g Oracle.DataAccess.dll 复制到项目的 bin 文件夹中,然后出现以下错误
类型初始值设定项 'Oracle.DataAccess.Client.OracleConnection' 抛出异常。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是使用 Xcopy 部署。这将安装即时客户端,请检查 readme.txt 以获取安装说明。
但我发现当前的 xcopy 软件包不支持 64 位,该版本将于 11 月到期。解决方法是为 x86 目标平台构建汇编。这仅适用于部署到 Windows Server 2008 x64 的情况。
仅复制 Oracle.DataAccess.dll 是不够的。
The easiest way is to install the the oracle odp.net package 11.2.0.1.2 with Xcopy Deployment. This installs an instant client, check the readme.txt for installation instructions.
But I have found out that the current xcopy package doesn't support 64bit which is due in November. The workaround is to build your assembles for x86 target platform. This only applies if you are deploying to windows server 2008 x64.
It is not sufficient to copy the Oracle.DataAccess.dll.