本文介绍了无法找到所需的.NET Framework数据提供。它可能没有安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好这是我第一次,我在发布的远程服务器deveolped与实体框架的项目。该网页正常工作,但是当我在保留区尝试访问等,读dabatase,我得到这个错误

Hi it is my first time that I publish a project deveolped with entity framework in a remote server. The pages work fine but when I try to access in my reserved area and so, reading a dabatase, I obtain this error

无法找到所需的.NET Framework数据提供。它可能没有安装。

说明:当前Web请求的执行过程中发生未处理的异常。请查看有关错误的详细堆栈跟踪信息,以及它起源于code。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

异常详细信息信息:System.ArgumentException:无法找到所需的.NET Framework数据提供。它可能没有安装。

Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.

源错误:

在当前Web请求的执行过程中生成了未处理的异常。有关异常原因和位置的信息可以使用下面的异常堆栈跟踪信息确定。

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

堆栈跟踪:

[ArgumentException的:无法找到所需的.NET Framework数据  供应商。它可能没有安装。]
  System.Data.Common.DbProviderFactories.GetFactory(字符串  providerInvariantName)1402071
  System.Data.EntityClient.EntityConnection.GetFactory(字符串  providerString)+35

[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1402071
System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +35

[ArgumentException的:指定的存储提供无法找到的  的结构中,或者是无效的。]
  System.Data.EntityClient.EntityConnection.GetFactory(字符串  providerString)+62
  System.Data.EntityClient.EntityConnection.ChangeConnectionString(字符串  newConnectionString)+263
  System.Data.EntityClient.EntityConnection..ctor(字符串  的connectionString)+81
  System.Data.Objects.ObjectContext.CreateEntityConnection(字符串  的connectionString)+42
  System.Data.Objects.ObjectContext..ctor(字符串的connectionString,  字符串defaultContainerName)+16
  shield_trust.db_shieldtrustEntities..ctor()的  D:\信任公司\ shield_trust \ shield_trust \ POCO.Context.cs:23
  shield_trust.user_login.check_login()的  D:\信任公司\ shield_trust \ shield_trust \ user_login.aspx.cs:65
  shield_trust.user_login.entraButton_Click(对象发件人,EventArgs的)  在D:\信任公司\ shield_trust \ shield_trust \ user_login.aspx.cs:25
  System.Web.UI.WebControls.Button.OnClick(EventArgs五)+118
  System.Web.UI.WebControls.Button.RaisePostBackEvent(字符串  eventArgument)+112
  System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(字符串  eventArgument)+10
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler  sourceControl,串eventArgument)+13
  System.Web.UI.Page.RaisePostBackEvent(NameValueCollection中POSTDATA)  +36 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)  5563

[ArgumentException: The specified store provider cannot be found in the configuration, or is not valid.]
System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +62
System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +263
System.Data.EntityClient.EntityConnection..ctor(String connectionString) +81
System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +42
System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +16
shield_trust.db_shieldtrustEntities..ctor() in D:\trust-company\shield_trust\shield_trust\POCO.Context.cs:23
shield_trust.user_login.check_login() in D:\trust-company\shield_trust\shield_trust\user_login.aspx.cs:65
shield_trust.user_login.entraButton_Click(Object sender, EventArgs e) in D:\trust-company\shield_trust\shield_trust\user_login.aspx.cs:25
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

我有一些DLL复制到我的bin文件夹或修改我的web.config?

I have to copy some dll into my bin folder or modify my web.config?

推荐答案

尝试运行它来获取安装的提供程序列表,检查你是否有:

Try running this to get a list of installed providers, and check yours is there:

// This example assumes a reference to System.Data.Common.
static DataTable GetProviderFactoryClasses()
{
    // Retrieve the installed providers and factories.
    DataTable table = DbProviderFactories.GetFactoryClasses();

    // Display each row and column value.
    foreach (DataRow row in table.Rows)
    {
        foreach (DataColumn column in table.Columns)
        {
            Console.WriteLine(row[column]);
        }
    }
    return table;
}

更新:您需要安装在目标机器上的MySQL的提供者,它被称为像的MySQL Connector网XXX,你可以从的

这篇关于无法找到所需的.NET Framework数据提供。它可能没有安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 08:27
查看更多