0

I am getting a runtime System.TypeInitializationException that points to the custom edmMappings that have been inserted into the web.config:

<oracle.manageddataaccess.client>
   <version number="*">
      <edmMappings>
        <!--added the following number mapping to eliminate mapping to short error-->
        <edmNumberMapping>
          <add NETType="bool" MinPrecision="1" MaxPrecision="1" DBType="Number"/>
          <add NETType="int16" MinPrecision="2" MaxPrecision="5" DBType="Number"/>
        </edmNumberMapping>
      </edmMappings>

      <dataSources>
        <!--my sources-->
      </dataSources>

      <settings>
         <!--my settings-->
      </settings>
   </version>
</oracle.manageddataaccess.client>

Error is:

The element 'edmMappings' has invalid child element 'edmNumberMapping'

What is weird is that someone that had worked on this app prior can get around this runtime error but I cannot. What is going wrong here?

  • Entity Framework 6.1.3
  • Oracle.ManagedDataAccess.EntityFramework 12.1.24

Thanks!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Can you check if the old format (prior to 12.1.0.2) is working for you (https://docs.oracle.com/cd/E63277_01/win.121/e63268/entityDataTypeMapping.htm#ODPNT8300)? Maybe there is some outdated older reference lingering around and poluting your runtime. Because as far as I can tell, there is nothing wrong within the config section that you included in your question. – grek40 Jan 21 '22 at 07:18
  • most likely DLL version – T.S. Jan 28 '22 at 14:57

0 Answers0