Unable to find the requested .Net Framework Data Provider. It may not be installed

前端 未结 5 1510
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 15:39

After completing the ASP.NET MVC 3 (find here), I tried to publish the app online. I contacted the hosting company to be sure if it\'s possible to host MVC 3 apps. But I had

相关标签:
5条回答
  • 2021-01-05 15:47

    From my experience, that error means that the value of the providerName attribute on the connection string in your web.config is either incorrect, or the provider literally is not installed. If your providerName is set to System.Data.SqlServerCe.4.0 (SQL Server Compact), which is not uncommon in development, I can guarantee you that it's not installed on your web host; it's only used inside Visual Studio for development. You probably just need to change it to a the real SQL Server provider: System.Data.SqlClient.

    0 讨论(0)
  • 2021-01-05 15:53

    Another data point...

    I work with Oracle and the Entity Framework. I installed the Oracle ODP.NET, Managed Driver to get by this problem. In the NuGet Package Manager enter

    Install-Package Oracle.ManagedDataAccess
    

    It will update the App.config with the appropriate assembly information and the DbProviderFactories. I'm using VS 2015, Entity Framework 6. I also have the Oracle Developer Tools installed.

    0 讨论(0)
  • 2021-01-05 15:58

    I faced the similar Issue .. and there is very funny solution for that .. Just look into your ConnectionString -- If it is same that you have used for your other ASP.Net apps, then it should not be... Entity Framework has a different case altogether

    <add name="EmployeeContext" connectionString="Server=.\SQLEXPRESS;Database=DB1;User Id=user1;password=password1;" providerName="System.Data.SqlClient**;**" />
    

    Change it to --

    <add name="EmployeeContext" connectionString="Server=.\SQLEXPRESS;Database=DB1;User Id=user1;password=password1;" providerName="System.Data.SqlClient"/>
    

    Can you identify the difference .. only one small -- There is no ';' at the end of ProviderName .. Yes and that makes the difference .. it should be same to same copy of the ProviderName, though I have not checked the case sensitivity. But that solved my Problem

    0 讨论(0)
  • 2021-01-05 16:04

    I resolved the issue.

    I find a space in providerName. So, .net framework is not able to estblish connection string with database.

    Check your connectionString tag attribute value. Your providerName may be not well defined. Look for any spaces (as the naming does not allow any) and check extra characters in providerName value.

    0 讨论(0)
  • 2021-01-05 16:13

    The error was perfect, and the comments above were good but in my case i literally spelled the provider wrong in the web.config file: System.Data.SqlClinet not System.Data.SqlClient

    0 讨论(0)
提交回复
热议问题