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

3

I want to connect with oledb connection(msdaora.dll) in my webapplication to 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.

2-- change my connection type from oledb to oracle.data.access but it isnt work too.

3-- I want to find 64 bit msdaora.dll but i cant find it.

What can I do to fix this error? Thanks.

windows
oracle
oracle11g
iis-7.5
oledb
asked on Stack Overflow Oct 3, 2012 by user1716182

2 Answers

0

I had a similar problem. The underlying issue was that my platform target was 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
  2. Installed the oracle client that was missing, msdora.dll for x64 in your case.

I think IIS is deciding which (x86 or x64) msdora.dll it will use because of the Any CPU platform target compilation. You have to either take away IIS's choice or provide it all the answers.

answered on Stack Overflow May 3, 2013 by Michael O'Neill
0

For me, it was a matter of switching items on the PATH environment variable. i.e. I placed this : C:\Oracle\product\11.2\bin; before this: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.

answered on Stack Overflow Nov 15, 2016 by Allan F

User contributions licensed under CC BY-SA 3.0