Solved , An exception of type 'System.TypeInitializationException' occurred in EntityFramework.dll but was not handled in user code

not handled Type Initialization Exception In web.config file change the version Version=4.4.0.0 or Version=5.0.0.0 or Version=6.0.0.0 will solve the error in System.TypeInitializationException sample web.config file attached, try and let us know your feedback in comment.

Download

Example Source Snippets - Type_Initialization_Exception.zip

System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection

How to handle An exception of type System.TypeInitializationException


       <?xml version="1.0"?>
<configuration>
    <system.web>
      <compilation debug="false" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>
  <configSections>
    
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    
    <!--<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />-->
    
    <!--<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />-->    
 
  </configSections>

</configuration>
                 

smartsnipps.ecomparefiles.com © 2019, All Rights Reserved | Disclaimer: smartsnipps.eCompareFiles.com is free to use any code snippets without guarantee