微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我是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>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐