Inheritance security rules violated by type: 'MySql.Data.Entity.MySqlEFConfiguration'

后端 未结 7 2051
滥情空心
滥情空心 2020-12-14 02:41

I\'ve created an asp.net web application which should connect to a mysql database.

I´m using entity framework 6 with an ado.net entity data model. I´ve also followed

相关标签:
7条回答
  • 2020-12-14 02:47

    I downgraded MySql.Data.Entity.EF6 to an older version and it solved my problem.

    0 讨论(0)
  • 2020-12-14 02:47

    Downgrade MySql.Data.Entity from version 6.10.x to 6.9.10 can solve the problem. It solved mine

    0 讨论(0)
  • 2020-12-14 02:49

    The same for me with VS2017. I used MySql.Data.Entity v6.9.10.
    Prior to that I also installed mysql connector for .Net version 6.9.10.

    • After that I installed the NuGet package for MySql.Data.Entity.
    • Last step was to modify the web.config accordingly:
      • connection string,
      • entity framework and
      • system.data (be aware that you have to update in the last two the version as well if you take them from mysql website)
    • Ahh not to forget I added also

      DbConfiguration.SetConfiguration(new MySqlEFConfiguration()) 
      

      in my app start up.

    and it finally worked :D

    0 讨论(0)
  • 2020-12-14 02:50

    Upgrading nuget package to 6.10.8 fixed this for me

    0 讨论(0)
  • 2020-12-14 02:54

    I've had some horrible instability problems with 6.9.10. It also seems like it has has been removed from NuGet. Under heavy load i was getting "database not found errors" sporadically.

    Try 6.9.11 instead. That seems stable for me. And its available on NuGet.

    0 讨论(0)
  • 2020-12-14 02:54

    I got the same issue after upgrading the MySql NuGet packages from 6.9.8 to 6.10.6 in VS 2017 Community. I followed the accepted answer's instructions and downgrading back to 6.9.x fixed it. Upon futher investigation, Oracle has fixed the bug in the upcoming 6.10.7 release (https://bugs.mysql.com/bug.php?id=89134).

    In short, until 6.10.7 is released, downgrade back to 6.9.x! I reverted back using the Nuget package manager and didn't have to change anything else to make it work.

    0 讨论(0)
提交回复
热议问题