使用 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" />
在网站项目的 .XSD 文件中,我在 web.config 文件中有以下连接
<add name="BannerCS" connectionString="DATA SOURCE=******;PASSWORD=**********;PERSIST SECURITY INFO=True;USER ID=*********"
providerName="Oracle.ManagedDataAccess.Client" />
我可以通过在数据集中的数据表中运行 SQL 查询来查看数据。基于 .net 3.5 的网站项目在编译时也没有给出任何错误。但是当我运行应用程序时,它给出了这个错误。
另外,当我添加对
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.