我想在我的web应用程序中使用oledb连接(msdaora.dll)连接到oracle。
我用途:
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
我的错误是什么
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
我以前尝试过:
1--在iis中,我将enable32applications
更改为true
。
2--将我的连接类型从oledb
更改为oracle.data.access
,但它也不起作用。
3--我想找到64位msdaora.dll,但找不到。
我可以做些什么来修复这个错误?谢谢。
2条答案
按热度按时间lp0sw83n1#
我也遇到过类似的问题,根本问题是我的目标平台是
Any CPU
,有两种解决方案对我有效:1.将平台目标更改为目标上现有(且唯一)Oracle客户端的CPU,在您的情况下为x86,或者
1.安装了缺少的oracle客户端,在您的情况下,为x64安装了msdora.dll。
我认为IIS正在决定使用哪个(x86或x64)msdora.dll,因为
Any CPU
平台目标编译。您必须要么取消IIS的选择,要么提供所有答案。rkttyhzu2#
对我来说,这是一个切换PATH环境变量上的项的问题。即,我放置了以下内容:C:\甲骨文\产品\11.2\bin;在此之前:C:\Oracle\产品\12.1.0\dbhome_1\bin;这些路径部分对于不同的公司将是不同的。然后需要记住将PATH上的项切换回以再次使用Oracle 12。