ASP.NET MVC Type not allowed for member MySql.Data.MySqlClient.MySqlException, MySql.Data

I added a new property to my ASP.NET MVC 5.2 app model with MySQL database, and now I would like to add a database migration for this purpose using this command:

Add-Migration RegisterPropertyAdded

      

But I am getting an exception:

Type not allowed for user MySql.Data.MySqlClient.MySqlException, MySql.Data, Version = 6.9.7.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d

It seems that MySQL wants to throw an exception, but cannot find the class of the exception for reasons I don't understand. I have installed the following NuGet packages to the project:

EntityFramework Version 6.1.3

MySql.Data Version 6.9.7

MySql.Data.Entities, version 6.8.3.0

MySql.Data.Entity Version 6.9.7

The model shows a class MySql.Data.MySqlClient.MySqlException

, so it seems that the class exists and I can't find any information that additional classes are needed for the exception class.

+3


source to share


2 answers


To see this exception, you need to update MySQL Connector / Net
Also make sure the MySQL server is running and you can connect to it.



+4


source


For me this message came up because of an invalid link line in the Web.config .



+1


source







All Articles