3

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 を見つけたいのですが、見つかりません。

このエラーを修正するにはどうすればよいですか? ありがとう。

4

2 に答える 2

0

同様の問題がありました。根本的な問題は、私のプラットフォーム ターゲットがAny CPU. 私のために働いた2つの解決策がありました:

  1. プラットフォーム ターゲットを、ターゲット上にある既存の (そして唯一の) Oracle クライアントの CPU (この場合は x86) に変更しました。
  2. 欠落していたOracleクライアント、x64用のmsdora.dllをインストールしました。

Any CPUIIS は、プラットフォーム ターゲットのコンパイルのために、使用する (x86 または x64) msdora.dll を決定していると思います。IIS の選択を取り除くか、IIS にすべての回答を提供する必要があります。

于 2013-05-03T21:27:30.697 に答える
0

私にとっては、PATH 環境変数の項目を切り替えることでした。つまり、これを配置しました: C:\Oracle\product\11.2\bin; この前:C:\Oracle\product\12.1.0\dbhome_1\bin; これらのパス部分は、会社ごとに異なります。Oracle 12 を再度使用するには、PATH 上の項目を元に戻すことを忘れないでください。

于 2016-11-15T00:31:11.650 に答える