i have installed vs2010 beta2, create a MVC website, i want to use subsoinc access a mysql database in SimpleRepository, when run the website, i get error: "Unable to find the requested .Net Framework Data Provider. It may not be installed. ".
var repo = new SimpleRepository("NorthwindMySql", SimpleRepositoryOptions.None);
var user = repo.Find(u => u.Username == "mm");
ViewData["UserData"] = user;
then, i use my vs2008 do the same thing, this time, the website works just fine.
how can i fix this? thanks.
解决方案
It is possible that you need to add this to your web.config file:
as the MySQL driver didn't register with the .NET 4 machine.config (.NET 4 was installed only after the MySQL connectivity drivers were installed).
Notice that the version of the MySQL driver you have may vary.