Tag Archives: SocketPermission

Fix .NET 4 SocketPermission for MySQL driver in Medium Trust

Most .NET 4 shared hosting providers offering their customers a medium trust environment. This is not a problem for most web applications unless the applications uses MySQL in combination with the .NET MySQL driver (MySQL.Data.dll). The MySQL driver connects to the MySQL database using a socket. However, sockets are not allowed in medium trust. The application will throw a SecurityException with the following message:

Continue reading Fix .NET 4 SocketPermission for MySQL driver in Medium Trust