gpt4 book ai didi

asp.net - 无法加载 mysql.web 程序集

转载 作者:IT老高 更新时间:2023-10-28 23:55:41 26 4
gpt4 key购买 nike

我正在使用 ASP.net MVC3 制作一个 Web 应用程序。我最终想使用登录表单使用的角色提供者和身份验证。所以我有这段代码:

<authentication mode="Forms">
<forms loginUrl="~/Home/Login" timeout="2880" />
</authentication>

<roleManager enabled="true" defaultProvider="MyRoleProvider">
<providers>
<add name="MyRoleProvider"
type="StudentAdministratieProject.Authorisation.CustomRoleProvider"/>
</providers>
</roleManager>

这段代码显然位于我的 web.config 中。

启动应用程序时出现的错误:

Can't load file or assembly MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d or one of the dependencies can't be loaded. The system cannot find the given file. ** Note that this is roughly translated from Dutch, the error was originally in Dutch.

有什么想法吗?我用 Google 搜索了很多,但找不到任何对我有帮助的东西!

最佳答案

意识到这是旧的,但如果以后查看,这就是我发现的原因/解决方案。

我必须在我的常规 .NET Web 服务器(同一台机器上的数据库和 Web 服务器)上做一些 MySQL 工作,所以我使用了 MySQL 安装程序 (http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html)。那个小傻瓜似乎已经为我更新了我的 .NET machine.config ,真好,所以它的连接器可以很好地与 .NET 配合使用。愚蠢的安装程序。无论如何,当我去使用 .NET/SQL Server 应用程序(与 MySQL 无关)时,我遇到了同样的错误。

很容易修复(并且您使用 MySQL 的应用程序应该仍然可以正常工作)。只需在适当的 .NET 框架 machine.config 中注释掉 MySQL 引用即可。

注意:错误所在的网页会告诉您哪个 machine.config 文件(和行号)有问题。

下面的链接更详细:

http://forums.asp.net/t/1928379.aspx

关于asp.net - 无法加载 mysql.web 程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17436446/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com