gpt4 book ai didi

c# - 如何修复 : The provider did not return a ProviderManifestToken string?

转载 作者:行者123 更新时间:2023-12-01 00:08:41 31 4
gpt4 key购买 nike

<分区>

我使用 .NET Framework 4.7 以及 ASP.NET Web 窗体模板和身份验证模式个人用户帐户创建了一个 ASP.NET Web 应用程序 (.NET Framework)


我的连接字符串

<add name="DefaultConnection" connectionString="server=mysql server;password=password;port=3306;uid=username;database=schemaname" providerName="MySql.Data.MySqlClient"/>

(它充满了正确的值,但我不想发布它们...)
Entity Framework

  <entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>
</entityFramework>

错误

System.InvalidOperationException: 'The Entity Framework provider type 'MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6' registered in the application config file for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.'

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)//<-- this line
{
}

public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}

我已经读过那些:

当我修复一个错误时,修复后出现了另一个错误,然后又出现了另一个错误等等,所以我用上面的设置创建了一个新项目,我希望有人能帮助我解决这个问题。 (这是我第一次使用 ASP.NET Web Forms)

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