MySQL .net Connector + GoDaddy Shared Hosting
May 5th, 2009
It’s been a while since I’ve messed around with asp.net web.config files. Here’s a tip for anyone trying to use the mysql connector with asp.net. You need to add the following to your web.config or it will bitch to you about trust levels.
<system.data>
<DbProviderFactories>
<clear />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
Version=6.0.2.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
GoDaddy has modified their medium trust environment to use the connector. All new connectors are compiled to accept partially trusted callers. It is important to note that the version in your web.config must match the version of the connector DLL.