我们正在开发一个连接到 oracle 数据库的 Windows 服务。我们使用 Nuget 包中的 Oracle ManagedDataAccess。运行 Windows 服务时,我们收到以下错误。试图从 stackoverflows 获取详细信息,但没有任何方法可以解决问题。我们的配置文件如下
无法加载文件或程序集“Oracle.ManagedDataAccess,Version=4.122.19.1,Culture=neutral,PublicKeyToken=89b483f429c47342”或其依赖项之一
配置
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="eClaimsService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="oracle.manageddataaccess.client"
type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</sectionGroup>
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.ManagedDataAccess.Client"/>
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>
</system.data>
<system.web>
<httpRuntime executionTimeout="3600" requestValidationMode="2.0" maxRequestLength="10240"/>
<sessionState mode="InProc" timeout="60"/>
<pages validateRequest="false" />
</system.web>
</configuration>