ASP.NET with MySQL: Configuration Error (MySql.Web.v20)

Recently got stucked on an issue while using MySQL db with a ASP.NET project and ran into configuration error “Parser Error Message: Could not load file or assembly ‘MySql.Web.v20, Version=′” despite the fact that MySql.Data, MySql.Data.Entity and MySql.Web in my referrences, all added with nuget install-Package commands. That got me really frustrating…

This issue occurs when you install MySQL .NET Connector 6.9.4 (probably other versions too) and did not uncheck “Web Providers” during the installation; it writes in your machine.config which brings you to this error.

To solve the problem properly, follow below steps :

  1. Start the installer and click “Change” then remove the “Web Providers” section entirely.MySqlConfigThis will remove the declarations from your machine.config. You can find the path to machine.config below:
  2. When your machine config is clear add the MySql.Web assembly to your project and add the MySQLMembershipProvider declaration in your project web.config using the standard procedure.

You can find the connector for MySQL from here.