I created an ASP.NET Web Application (.NET Framework) with .NET Framework 4.7 and with ASP.NET Web Forms template and authentication mode Individual User Accounts.
My connection string
<add name="DefaultConnection" connectionString="server=mysql server;password=password;port=3306;uid=username;database=schemaname" providerName="MySql.Data.MySqlClient"/>
(It's filled with CORRECT values, but I don't want to publish them...)
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>
Error
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.'
at
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)//<-- this line
{
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
I already read those:
- Exception : The provider did not return a ProviderManifestToken string-Entityframework
- The provider did not return a ProviderManifestToken string
- The provider did not return a ProviderManifestToken string error
- Dynamic MySQL database connection for Entity Framework 6
- https://learn.microsoft.com/en-us/aspnet/identity/overview/extensibility/implementing-a-custom-mysql-aspnet-identity-storage-provider
- https://dev.mysql.com/doc/connectors/en/connector-net-entityframework60.html
When I fixed an error another appeared after fixing than appeared another and so on, so I created a new project with settings above and I hope someone can help me to solve this issue. (This is my first time using ASP.NET Web Forms)