2017-06-15 46 views
0

我试图创建一个Web前端到现有的产品,它使用一个火鸟数据库作为后端。mvc .net ADO> NET provider is not registered or could be loaded

我已经安装了firebird实体框架和数据提供程序nuget包,但我收到此错误。

错误175:具有不变名称“FirebirdSql.Data.FirebirdClient”的ADO.NET提供程序未在计算机或应用程序配置文件中注册,或者无法加载。

我得在webconfig如下:

<entityFramework> 
    <defaultConnectionFactory type="FirebirdSql.Data.EntityFramework6.FbConnectionFactory, EntityFramework.Firebird" /> 
<providers> 
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
    <provider invariantName="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.EntityFramework6.FbProviderServices, EntityFramework.Firebird" /> 
</providers> 

<system.data> 
    <DbProviderFactories> 
     <add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" /> 
    </DbProviderFactories> 
</system.data> 

如果有人能指出可能公然明显的事情我做错了,那会太棒了。

+0

您是否在系统中存在“System.Data.dll”并在项目中引用? – Nirman

+2

你的web.config的XML看起来没有格式正确,确保它实际上已经正确定义。还要确保你的项目中实际上已经引用了Firebird ado.net客户端和Firebird实体框架支持。 –

+0

事情是这个错误不会让网络应用程序无法运行。 Web应用程序在运行时仍能够从数据库中读取信息。这个错误只发生在我尝试从数据库中生成代码第一个模型的事情/查看现有的 –

回答

1

修正了它。安装程序似乎已经在machine.config文件中引用了一个引用。删除它并添加了包含在firebird的自述文件中的东西DDEX

+0

这是[安装程序的已知问题](http://tracker.firebirdsql.org/browse/DNET-560 ) 多年 – magicandre1981

相关问题