The partial trust support for MySQL Connector/NET has improved rapidly throughout the 6.5.x and 6.6.x versions. The latest enhancements do require some configuration changes in existing deployments. Here is a summary of the changes for each version.
Now you can install the
library in the Global Assembly Cache (GAC) as explained in
Section 5.17.2, “Configuring Partial Trust with Connector/NET Library Installed in GAC”, or in a
lib folder inside
the project or solution as explained in
Section 5.17.3, “Configuring Partial Trust with Connector/NET Library Not Installed in GAC”. If the
library is not in the GAC, the only protocol supported is
Connector/NET 6.5 fully enables our provider to run in a partial trust
environment when the library is installed in the Global Assembly
Cache (GAC). The new
class, derived from the .NET
class, helps to simplify the permission setup.
Starting with these versions, Connector/NET can be used under partial
trust hosting that has been modified to allow the use of sockets
for communication. By default, partial trust does not include
SocketPermission. Connector/NET uses sockets to talk
with the MySQL server, so the hosting provider must create a new
trust level that is an exact clone of partial trust but that has
the following permissions added:
Connector/NET versions prior to 5.0.8 and 5.1.3 were not compatible with partial trust hosting.