Oracle 5.0 Reference Manual page 1953

Table of Contents

Advertisement

The Connector/Net support for partial trust has improved over time to simplify the configuration and
deployment process for hosting providers.
20.2.5.19.1. Evolution of Partial Trust Support Across Connector/Net Versions
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.
6.6.4 and Above: Library Can Be Inside or Outside GAC
Now you can install the
in
Section 20.2.5.19.2, "Configuring Partial Trust with Connector/Net Library Installed in
or
bin
lib
Trust with Connector/Net Library Not Installed in
supported is TCP/IP.
6.5.1 and Above: Partial Trust Requires Library in the GAC
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
from the .NET
5.0.8 / 5.1.3 and Above: Partial Trust Requires Socket Permissions
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:
System.Net.SocketPermission
System.Security.Permissions.ReflectionPermission
System.Net.DnsPermission
System.Security.Permissions.SecurityPermission
Prior to 5.0.8 / 5.1.3: Partial Trust Not Supported
Connector/Net versions prior to 5.0.8 and 5.1.3 were not compatible with partial trust hosting.
20.2.5.19.2. Configuring Partial Trust with Connector/Net Library Installed in GAC
If the library is installed in the GAC, you must include the connection option
includesecurityasserts=true
Connector/Net 6.6.4.
The following list shows steps and code fragments needed to run a Connector/Net application in
a partial trust environment. For illustration purposes, we use the Pipe Connections protocol in this
example.
1. Install Connector/Net: version 6.6.1 or higher, or 6.5.4 or higher.
2. After installing the library, make the following configuration changes:
In the
SecurityClasses
including the version to use.
<configuration>
<mscorlib>
<security>
Connector/Net Programming
MySql.Data.dll
folder inside the project or solution as explained in
DBDataPermission
section, add a definition for the
library in the Global Assembly Cache (GAC) as explained
GAC". If the library is not in the GAC, the only protocol
MySqlClientPermission
class, helps to simplify the permission setup.
in your connection string. This is a new requirement as of
1933
Section 20.2.5.19.3, "Configuring Partial
MySqlClientPermission
GAC", or in a
class, derived
class,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents