Search This Blog

Monday, January 25, 2010

MySQL Connector Net on Hosting server

while i try to deploy my site that use asp.net with Mysql Database , i get the next error:
"Unable to find the requested .Net Framework Data Provider. It may not be installed. ".
to fix it , you need to set your mysql connector as a provider , because you can not edit the machine.config file , so you will have to add the next lines to your web.config file , you can copy and paste from yours machine.config file.
<system.data>    <DbProviderFactories>      <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.1.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />    </DbProviderFactories>  </system.data>


you may have to set the version number, depending on which Connector you are using.

enjoy
Yaniv T

No comments: