The partial trust support for 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.19.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.19.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
MySqlClientPermission class, derived from the
DBDataPermission 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
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.