Thanks to Steve Huff who blogged about a solution to the above problem.

If you are planning to use MySql .Net Connector in ASP.Net, you may get the above error if MySql.Data.CF.dll is installed in both GAC and Bin folder. So you need to delete it from Bin folder to fix the problem.

You need to keep the following files intact inside the Bin folder:

MySql.Data.dll
MySql.Data.Entity.dll
MySql.Web.dll
MySql.VisualStudio.dll

Thanks.