在10g IIS服务器环境中部署odp.net 11g应用程序

发布于 2024-09-28 14:18:15 字数 470 浏览 0 评论 0 原文

我使用 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' 抛出异常。

I have developed a C# 3.5 Mvc 1.0 application using oracle 11gR2 client which uses odp .net 2.112.1.0. I want to deploy it in my IIS7 server which has oracle client 10g which uses odp.net 2.102.2.20 . I am getting the following error

Could not load file or assembly
'Oracle.DataAccess, Version=2.112.1.0,
Culture=neutral,
PublicKeyToken=89b483f429c47342' or
one of its dependencies. The system
cannot find the file specified.

I tried copying the 11g Oracle.DataAccess.dll to the bin folder of my project then it gives the following error

The type initializer for
'Oracle.DataAccess.Client.OracleConnection'
threw an exception.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心舞飞扬 2024-10-05 14:18:15

最简单的方法是使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文