Everything worked fine locally, but when I uploaded the website to my hosting provider I got the error:
‘MySqlConnection’ is ambiguous in the namespace ‘MySql.Data.MySqlClient’
Searching the internet for a solution didn’t work, although I found several suggestions. I thought I’d post my solution in case someone else has this problem.
In my BIN directory I had the following files:
MySql.Data.CF.dll
MySql.Data.dll
MySql.Data.Entity.dll
MySql.Web.dll
I had to delete the file MySql.Data.CF.dll and then everything worked. Strange considering it was not even referenced in the web.config file.