加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

ASP.NET和MySQL .Net Framework数据提供程序问题

发布时间:2020-12-16 07:37:50 所属栏目:asp.Net 来源:网络整理
导读:我是ASP.NET的新手.每次我尝试运行我的应用程序时,都会遇到下面的错误消息.我已经多次为 MySQL安装.Net Framework Data Provider. 我希望有人可以帮助我.提前致谢. Server Error in '/PLDT QuickSearcher' Application.Unable to find the requested .Net Fr
我是ASP.NET的新手.每次我尝试运行我的应用程序时,都会遇到下面的错误消息.我已经多次为 MySQL安装.Net Framework Data Provider.
我希望有人可以帮助我.提前致谢.

Server Error in '/PLDT QuickSearcher' Application.

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

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. 

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

解决方法

添加MySql.Data.dll作为项目的参考
将此块添加到web.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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读