简体   繁体   English

OleDbException (0x80004005):未找到 Oracle 客户端和网络组件。 我怎样才能解决这个问题?

[英]OleDbException (0x80004005): Oracle client and networking components were not found. How can I fix this?

I want to connect with oledb connection(msdaora.dll) in my webapplication to oracle.我想用我的 web 应用程序中的 oledb 连接(msdaora.dll)连接到 oracle。

I USE :我用 :

IIS 7.5
64 bit windows server 2008 r2 enterprise.
64 bit oracle 11g
32 bit oracle client

visual studio 2010
32bit msdaora.dll
my aplication is .aspx

and what is my error :我的错误是什么:

Server Error in '/PPIGanTT' Application.
--------------------------------------------------------------------------------

Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.

Provider is unable to function until these components are installed. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.OleDb.OleDbException: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.

Provider is unable to function until these components are installed.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[OleDbException (0x80004005): Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.

Provider is unable to function until these components are installed.]
   System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +351
   System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +31
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +76
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.OleDb.OleDbConnection.Open() +43
   csOra.OpenCnn() +47
   csOra..ctor(String sTnsName, String sUserId, String sPassword) +273
   _Default.Page_Load(Object sender, EventArgs e) +8801
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

what i try before :我之前尝试过的:

1-- in iis, I change the enable32applications to true . 1 - 在 iis 中,我将enable32applications更改为true

2-- change my connection type from oledb to oracle.data.access but it isnt work too. 2 - 将我的连接类型从oledboracle.data.access但它也不起作用。

3-- I want to find 64 bit msdaora.dll but i cant find it. 3-- 我想找到 64 位 msdaora.dll 但我找不到。

What can I do to fix this error?我能做些什么来解决这个错误? Thanks.谢谢。

I had a similar problem.我有一个类似的问题。 The underlying issue was that my platform target was Any CPU .根本问题是我的平台目标是Any CPU There were two solutions that worked for me:有两种解决方案对我有用:

  1. Changed the platform target to the CPU of the existing (and only) oracle client you have on the target, x86 in your case, or将平台目标更改为您在目标上拥有的现有(且唯一)oracle 客户端的 CPU,在您的情况下为 x86,或
  2. Installed the oracle client that was missing, msdora.dll for x64 in your case.安装了缺少的 oracle 客户端,在您的情况下为 x64 的 msdora.dll。

I think IIS is deciding which (x86 or x64) msdora.dll it will use because of the Any CPU platform target compilation.我认为 IIS 正在决定它将使用哪个(x86 或 x64)msdora.dll,因为Any CPU平台目标编译。 You have to either take away IIS's choice or provide it all the answers.您必须要么取消 IIS 的选择,要么提供所有答案。

For me, it was a matter of switching items on the PATH environment variable.对我来说,这是在 PATH 环境变量上切换项目的问题。 ie I placed this : C:\Oracle\product\11.2\bin;即我放置了这个:C:\Oracle\product\11.2\bin; before this:C:\Oracle\product\12.1.0\dbhome_1\bin;在此之前:C:\Oracle\product\12.1.0\dbhome_1\bin; These path parts will be different for different companies.对于不同的公司,这些路径部分会有所不同。 There is then a requirement to remember to switch items on PATH back to use Oracle 12 again.然后需要记住将 PATH 上的项目切换回以再次使用 Oracle 12。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 AllocateStreamingResources 会失败并显示错误代码 0x80004005? - Why would AllocateStreamingResources fail with error code 0x80004005? 开发人员解锁Windows Phone 8获取0x80004005 - Developer Unlock Windows Phone 8 getting 0x80004005 Oracle 11g-找不到Windows Server 2008 x64的客户端和网络组件 - Oracle 11g - client and network component were not found Windows Server 2008 x64 使用 net 调试目标计算机 (VM) 时,WinDbg 失败并出现错误 0x80004005 - WinDbg failed with error 0x80004005 when debugging target machine (VM) using net 蓝牙Microsoft鼠标连接Windows 7 64的错误代码0x80004005 - Error code 0x80004005 for Bluetooth Microsoft Mouse connection Windows 7 64 Windows Search SQL:LIKE语句中的分号导致异常(E_FAIL 0x80004005) - Windows Search SQL: Semicolon in LIKE statement causes exception (E_FAIL 0x80004005) InternetShortcut object IPersistFile::Save 失败并显示 E_FAIL (0x80004005) - InternetShortcut object IPersistFile::Save fails with E_FAIL (0x80004005) Windows 10 上的 genymotion“无法加载 virtualbox 引擎”和 Virtualbox 错误“结果代码:E_FAIL (0x80004005)” - genymotion "unable to load virtualbox engine" on windows 10 and Virtualbox error " Result Code: E_FAIL (0x80004005)" Jenkins 错误:未找到测试报告文件。 配置错误? - Jenkins Error: No test report files were found. Configuration error? 如何解决“ImportError: DLL load failed while importing _arpack: The specified procedure could not be found.”? - How to fix "ImportError: DLL load failed while importing _arpack: The specified procedure could not be found."?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM