无法加载文件或程序集“ Oracle.ManagedDataAccess”

时间:2019-11-07 05:31:57

标签: c# windows-services config oracle-manageddataaccess

我们正在开发Windows服务,该服务可连接到oracle数据库。我们用 Nuget软件包中的Oracle ManagedDataAccess。 当运行Windows服务时,我们收到以下错误。试图从stackoverflows中获取详细信息,但是没有任何方法能够解决问题。 我们的配置文件如下

  

无法加载文件或程序集'Oracle.ManagedDataAccess,   版本= 4.122.19.1,文化=中性,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>

0 个答案:

没有答案