从文件共享使用 ODP.NET 的 WebService
我有一个 C# ASMX Web 服务,它使用 Oracle.DataAccess.Client 连接到 Oracle 数据库。当我尝试调用 Web 方法时,收到以下错误消息:
无法加载 dll“OraOps10.dll”
与 之前问过,显着的区别是我确实有 ODAP(至少我在 Oracle 客户端安装的 bin 目录中有 OraOps10.dll),但它已安装 >在文件共享 (W:) 上,并且未在我的计算机上注册(Web 服务在 VisualStudio 的测试 Web 服务器上运行)。
即使我尝试将上述 DLL 复制到 Web 服务 bin/ 目录中,它也找不到它。堆栈跟踪听起来像是在注册表中寻找它。
有什么方法可以告诉我的 Web 服务在哪里可以找到 ODAP 安装吗?(在 web.config 或类似文件中设置 ORACLE_HOME)
(请注意:可以使用有效的 Oracle 客户端安装在每台目标计算机上,打开与 System.Data.Oracle 的 Oracle 连接都可以正常工作,只是客户端安装似乎不包含 ODAP:我在“添加引用 -> ”中找不到任何“Oracle”条目。 。网”。*)
I have a C# ASMX web service that uses Oracle.DataAccess.Client
to connect to an Oracle database. When I try to call a web method I get this error message:
unable to load dll 'OraOps10.dll'
It's the same problem as asked before, with the significant difference that I do have ODAP (at least I have OraOps10.dll in an Oracle client installation's bin directory), but it is installed on a File Share (W:), and not registered on my machine (where the web service runs on VisualStudio's test web server).
Even when I tried and copied the said DLL into the web service bin/ directory, it wouldn't find it. The stacktrace sounds like it is looking for it in the registry.
Is there any way I can tell my web service where to find the ODAP installation? (Set the ORACLE_HOME in the web.config or similar)
(Please note: A working Oracle client installation is available on every target machine and it works fine to open an Oracle connection with System.Data.Oracle, only that client installation seems not to include the ODAP: I cannot find any "Oracle" entry in "Add Reference -> .NET".*)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没看错的话,听起来您在本地安装了 Oracle 客户端,但没有在本地安装 ODP.net 客户端 - 相反,它“安装”在另一台计算机上,但它使用它的 ORA home 作为共享“W:”驱动器。
您知道 W: 驱动器上的 ODP 安装是什么类型吗?
如果是 XCOPY(但您也可以安全地尝试经典安装),只需添加 PATH 变量即可安全:(一如既往,在使用 PATH 或注册表备份之前!)
http://www.oracle.com/technetwork/ oramag/2008/08-nov/o68odpnet-101744.html
至于注册表;查看
让它正常工作的一个可靠方法是将 ODP 本地安装到测试盒上,但 PATH 变量应该是您所需要的。您可以找到文件@
http://www.oracle.com/technetwork/topics/dotnet/ Whatsnew/index.html
If I am reading this correctly, it sounds like you have the Oracle Client installed locally but not the ODP.net client installed locally -- rather it is 'installed' on a different computer but it uses it's ORA home as the shared 'W:' drive.
Do you know what type of ODP installation is on the W: drive?
if it is XCOPY (but you may also be safe to try this out with a classic install) you may be safe with simply adding the PATH variables: (as always, before monkeying around with the PATH or the registry BACK IT UP!)
http://www.oracle.com/technetwork/oramag/2008/08-nov/o68odpnet-101744.html
As for the registry; check
A sure fire way to get it to work is to install ODP locally onto the test box, but the PATH variables should be all that you need. You can find the files @
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html