甲骨文净ManagedDataAccess错误:未能从程序集加载类型“OracleInternal.Common.ConfigBaseClass” [英] Oracle .Net ManagedDataAccess Error: Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly

查看:4271
本文介绍了甲骨文净ManagedDataAccess错误:未能从程序集加载类型“OracleInternal.Common.ConfigBaseClass”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有本地工作,我们的开发服务器上,而我们的生产服务器上的一个项目。

I have a project that works locally, on our dev server, and on our production server.

当我试图在测试服务器上运行它,我得到下面的错误,我不知道在我的屏幕做些什么超越楞。提示?流程追溯问题源头?

When I try to run it on the test server, I get the error below, and I don't know what to do about it beyond stare at my screen blankly. Hints? Process to trace the issue to its source?

我已经安装了的NuGet包甲骨文12.2等。

I've installed the NuGet package for Oracle 12.2, etc.

这是无法加载类型OracleInternal.Common.ConfigBaseClass
  集Oracle.ManagedDataAccess,版本= 4.121.2.0,
  文化=中性公钥= 89b483f429c47342。说明:
  当前Web的执行过程中发生未处理的异常
  请求。请检查堆栈跟踪有关的详细信息
  错误以及它起源于code。

Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly 'Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. 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.

异常详细信息:System.TypeLoadException:未能加载类型
  从程序集OracleInternal.Common.ConfigBaseClass
  Oracle.ManagedDataAccess,版本= 4.121.2.0,文化=中立,
  公钥= 89b483f429c47342'。

Exception Details: System.TypeLoadException: Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly 'Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'.

源错误:

的执行过程中生成了未处理的异常
  当前Web请求。有关的起源和位置信息
  除了可以使用异常堆栈跟踪下面来识别。

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.

堆栈跟踪:

[TypeLoadException:未能加载类型
  从程序集OracleInternal.Common.ConfigBaseClass
  Oracle.ManagedDataAccess,版本= 4.121.2.0,文化=中立,
  公钥= 89b483f429c47342']结果
  Oracle.ManagedDataAccess.EntityFramework.EntityFrameworkProviderSettings.Oracle.ManagedDataAccess.EntityFramework.EFProviderSettings.IEFProviderSettings.get_TracingEnabled()
  + 0 Oracle.ManagedDataAccess.EntityFramework.EFProviderSettings.InitializeProviderSettings()
  +111 Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices..ctor()
  629 Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices..cctor()
  +28

[TypeLoadException: Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly 'Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'.]
Oracle.ManagedDataAccess.EntityFramework.EntityFrameworkProviderSettings.Oracle.ManagedDataAccess.EntityFramework.EFProviderSettings.IEFProviderSettings.get_TracingEnabled() +0 Oracle.ManagedDataAccess.EntityFramework.EFProviderSettings.InitializeProviderSettings() +111 Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices..ctor() +629 Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices..cctor() +28

[TypeInitializationException:该类型初始化
  Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices
  引发了异常。]结果
  Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.get_Instance()
  +24

[TypeInitializationException: The type initializer for 'Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices' threw an exception.]
Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.get_Instance() +24

在web.config具有以下块吧:

The Web.Config has the following blocks in it:

  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  </configSections>

  <oracle.manageddataaccess.client>
    <version number="*">
      <dataSources>
        <dataSource alias="PVMDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pdxcludds108.pacificorp.us)(PORT=11086))(CONNECT_DATA=(SERVICE_NAME=DDS1086.PACIFICORP.US))) " />
      </dataSources>
    </version>
  </oracle.manageddataaccess.client>
  <connectionStrings>
    <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=USERID;Password=WORKINGPASSWORD;Data Source=PVMDataSource" />
    <add name="PVMEntities" connectionString="metadata=res://*/Models.PVMModel.csdl|res://*/Models.PVMModel.ssdl|res://*/Models.PVMModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=pdxcludds108.pacificorp.us:11086/DDS1086.PACIFICORP.US;PASSWORD=XXXXXXX;PERSIST SECURITY INFO=True;USER ID=XXX&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>

注:有此服务器上工作的其他项目,他们只是使用不同版本的Oracle客户端对于.NET的。其他的没有仅使用管理驱动程序。我要寻找一种方式来挖这个错误,有的提示,如该类型的来源和加载。

NOTE: There are other projects working on this server, they're just using a different version of the Oracle client for .Net. None of the others is using only the Managed driver. I am looking for a way to dig into this error, some hint as to where that type is sourced and loaded from.

推荐答案

之所以能够从由包管理器安装的那些由安装那些在项目Oracle.ManagedDataAccess和Oracle.ManagedDataAccess.EntityFramework更换引用修复oracle的客户端安装程序。该版本是相同的,但版本号是这些DLL

Was able to fix it by replacing references in the project to Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework from those installed by the package manager to those installed by the oracle client installer. The versions are the same but the build number is different on those DLLs

这篇关于甲骨文净ManagedDataAccess错误:未能从程序集加载类型“OracleInternal.Common.ConfigBaseClass”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆