title: Oracle .Net ManagedDataAccess Error: Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly
body: <p>I have a project that works locally, on our dev server, and on our production server.</p>
  
  <p>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?</p>
  
  <p>I've installed the NuGet package for Oracle 12.2, etc.</p>
  
  <blockquote>
    <p>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. </p>
    
    <p>Exception Details: System.TypeLoadException: Could not load type
    'OracleInternal.Common.ConfigBaseClass' from assembly
    'Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral,
    PublicKeyToken=89b483f429c47342'.</p>
    
    <p>Source Error: </p>
    
    <p>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.</p>
    
    <p>Stack Trace: </p>
    
    <p>[TypeLoadException: Could not load type
    'OracleInternal.Common.ConfigBaseClass' from assembly
    'Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral,
    PublicKeyToken=89b483f429c47342'.]<br>
    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</p>
    
    <p>[TypeInitializationException: The type initializer for
    'Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices'
    threw an exception.]<br>
    Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.get_Instance()
    +24</p>
  </blockquote>
  
  <p>The Web.Config has the following blocks in it:</p>
  
  <pre><code>  &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /&gt;
    &lt;/configSections&gt;
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>  &lt;oracle.manageddataaccess.client&gt;
      &lt;version number="*"&gt;
        &lt;dataSources&gt;
          &lt;dataSource alias="PVMDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pdxcludds108.pacificorp.us)(PORT=11086))(CONNECT_DATA=(SERVICE_NAME=DDS1086.PACIFICORP.US))) " /&gt;
        &lt;/dataSources&gt;
      &lt;/version&gt;
    &lt;/oracle.manageddataaccess.client&gt;
    &lt;connectionStrings&gt;
      &lt;add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=USERID;Password=WORKINGPASSWORD;Data Source=PVMDataSource" /&gt;
      &lt;add name="PVMEntities" connectionString="metadata=res://*/Models.PVMModel.csdl|res://*/Models.PVMModel.ssdl|res://*/Models.PVMModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&amp;quot;DATA SOURCE=pdxcludds108.pacificorp.us:11086/DDS1086.PACIFICORP.US;PASSWORD=XXXXXXX;PERSIST SECURITY INFO=True;USER ID=XXX&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>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.</p>