entity-framework - Entity Framework : unable to determine the provider name for provider factory of type 'system.data.sqlclient.sqlclientfactory'

标签 entity-framework azure

我有一个使用 Entity Framework 和 SQLServer 的网站。 当我尝试在 Azure 上运行我的应用程序时,出现以下错误:

Unable to determine the provider name for provider factory of type 'system.data.sqlclient.sqlclientfactory'. make sure that the ado.net provider is installed or registered in the application config.

在本地一切正常。

最佳答案

我终于发现错误是由这个配置部分引起的(现在我不再使用了):

  <system.data>
    <DbProviderFactories>
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, mysql.data" />
    </DbProviderFactories>
  </system.data>

我已将其删除,现在它可以正常工作了。

关于entity-framework - Entity Framework : unable to determine the provider name for provider factory of type 'system.data.sqlclient.sqlclientfactory' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26907079/

相关文章:

c# - 如何更改 Entity Framework 中的数据库名称

c# - 首先使用实体​​框架代码和 IOC 容器来创建没有默认构造函数的实体

azure - 如何备份 Azure Cosmos DB

Azure应用程序自动扩展

azure - SAML 和 MSAL 之间的区别?哪一个应该用VB代码设置?

reactjs - 如何在运行时从 React 应用程序访问 Azure Web App AppSettings

Azure 服务身份验证扩展默认租户/订阅

c# - 使用 EF 迁移将列从一个表连同值一起移动到另一个表

c# - 错误 BFProj2.Models.ContextModel 不包含 'SaveChanges' 的定义我缺少什么?

c# - Entity Framework 未修改身份列