Failed to find or load the registered .Net Framework Data Provider.

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
RomainT06
Posts: 5
Joined: Fri 23 Jan 2015 09:43

Failed to find or load the registered .Net Framework Data Provider.

Post by RomainT06 » Tue 27 Jan 2015 14:57

Hello,
I have the error at runtime
Exception:Thrown: "Failed to find or load the registered .Net Framework Data Provider." (System.Configuration.ConfigurationErrorsException)
A System.Configuration.ConfigurationErrorsException was thrown: "Failed to find or load the registered .Net Framework Data Provider."


I can't find a solution

This is my app.config file

Code: Select all

<configuration>
  <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="Devart.Data.Oracle.Entity" type="Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfigurationSection, Devart.Data.Oracle.Entity, Version=8.4.333.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.333.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.Oracle" />
      <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=8.4.333.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
  <Devart.Data.Oracle.Entity xmlns="http://devart.com/schemas/Devart.Data.Oracle.Entity/1.0">
  </Devart.Data.Oracle.Entity>
  <connectionStrings>
    <add name="Model1Container" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string="User Id=XXX;Password=XXX;Server=XXX;Persist Security Info=True"" providerName="System.Data.EntityClient" />
  </connectionStrings>
</configuration>
Please, I need your help

Romain

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Failed to find or load the registered .Net Framework Data Provider.

Post by Shalex » Tue 27 Jan 2015 15:13

The revision number of provider in the entityFramework section is *.6 but it should be *.0 in DbProviderFactories:

Code: Select all

<configuration>
  <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="Devart.Data.Oracle.Entity" type="Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfigurationSection, Devart.Data.Oracle.Entity, Version=8.4.333.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.333.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.Oracle" />
      <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=8.4.333.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
  <Devart.Data.Oracle.Entity xmlns="http://devart.com/schemas/Devart.Data.Oracle.Entity/1.0">
  </Devart.Data.Oracle.Entity>
  <connectionStrings>
    <add name="Model1Container" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Devart.Data.Oracle;provider connection string="User Id=XXX;Password=XXX;Server=XXX;Persist Security Info=True"" providerName="System.Data.EntityClient" />
  </connectionStrings>
</configuration>

RomainT06
Posts: 5
Joined: Fri 23 Jan 2015 09:43

Re: Failed to find or load the registered .Net Framework Data Provider.

Post by RomainT06 » Tue 27 Jan 2015 15:20

Thank you very much
it is working

Post Reply