I am trying to publish a website with our hosting provider. I am getting error due to the fact that they only allow a medium trust and the MySQL Connector/Net that I am using requires reflection to work. Unfortunately, reflection is not allowed in a medium trust.
After some research I found out that the newest version of the MySQL Connector/Net may solve this problem. Connector/Net 6.6 includes enhancements to partial trust support to allow hosting services to deploy applications without installing the Connector/Net library in the GAC. I am thinking that will solve my problem.
So, I unistalled MySQL Connector/Net 6.4.4 and I installed MySQL Connector/Net 6.6.4.
When I run the application in Visual Studio 2010 I get the error:
ProviderIncompatibleException was unhandled by user code
The message is
An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.
InnerException is
The provider did not return a ProviderManifestToken string.
Everything works fine when I have Connector/Net 6.4.4 installed. I can access the database and perform Read/Write/Delete action against it.
I have a reference to the following in the project:
- MySql.Data
- MySql.Data.Entity
- MySql.Web
My connection string in Web.config
<connectionStrings>
<add name="AESSmartEntities"
connectionString="server=ec2-xxx-xx-xxx-xx.compute-1.amazonaws.com;
user=root;
database=nunya;
port=3306;
password=xxxxxxx;"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
What might I be doing wrong? Do I need any additional setting(s) to work with version 6.6.4 that wasn't required in the older version 6.4.4?