ODP.net を使用しているときにこのエラーが発生します 接続を含めるとエラーが表示されます
<Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="BannerCS" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BannerCS (Web.config)" ParameterPrefix=":" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.BannerCS.ConnectionString" Provider="Oracle.ManagedDataAccess.Client" />
Web サイト プロジェクトの .XSD ファイルに、web.config ファイルに次の接続があります。
<add name="BannerCS" connectionString="DATA SOURCE=******;PASSWORD=**********;PERSIST SECURITY INFO=True;USER ID=*********"
providerName="Oracle.ManagedDataAccess.Client" />
データ セットのデータ テーブルで SQL クエリを実行すると、データを表示できます。.net 3.5 に基づく Web サイト プロジェクトでも、コンパイル時にエラーは発生しません。しかし、アプリケーションを実行すると、このエラーが発生します。
また、参照を追加すると
Oracle.ManagedDataAccess.dll
これをweb.configに追加することにより
<add assembly="Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
このエラーが発生します
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.