开发者

WebService to use ODP.NET from a File Share

开发者 https://www.devze.com 2023-01-12 14:59 出处:网络
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:

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".*)


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

Step 8: The last step in installing Oracle Data Access Components and Oracle Database Instant Client on the developer machine is to add two items to the Path environment variable. Right-click the My Computer icon and select Properties from the context menu. Next, click the Advanced tab in the System Properties dialog box and then click the Environment Variables button. In the System variables group, locate the Path variable in the list (scroll down if necessary). Click the Path variable in the list and then click Edit. In the Edit System Variable dialog box, place the cursor at the beginning of the entries and type C:\oracle\11.1\odac;C:\oracle\11.1\odac\bin; . Click OK to close the Edit System Variable dialog box, click OK to close the Environment Variables dialog box, and finally click OK again to close the System Properties dialog box

As for the registry; check

HLM\SOFTWARE\ORACLE\ODP.NET

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

0

精彩评论

暂无评论...
验证码 换一张
取 消