Last post Jan 04, 2012 06:23 AM by carl.steinhart
Jan 01, 2012 08:11 PM|ChayaCooper|LINK
I created a website and mySQL database which work fine on my computer but when I upload it to my hosting company I get an error message “Unable to find the requested .Net Framework Data Provider”
My hosting company (Premium Reseller) hasn’t been much use, as they tried telling me that while they are a recommended hosting company for Webmatrix by Microsoft, that they “Do not support asp.net & mysql combination. Mysql database go with PHP.”
This doesn’t make sense to me, since I would expect that I should be able to use Razor as instructed in the WebMatrix tutorials to connect to my database.
Does anyone know a workaround or do I need to rebuild my connections in php?
Jan 01, 2012 09:50 PM|Mikesdotnetting|LINK
Add the relevant dll to your bin folder and try again.
Jan 01, 2012 10:58 PM|ChayaCooper|LINK
I uploaded all the .dll files that were in my bin Folder (as listed below). Is there something else I need to add?
Jan 01, 2012 11:41 PM|Mikesdotnetting|LINK
I don't know which provider you are using for MySQL, but you should include the dll for that. Your connection string in your web.config should contain a reference to a specific provider for MySQL. MySql.Data.dll, perhaps?
I must confess, I know little or nothing about MySQL. However, it surprises me that they say they cannot offer any support, yet presumably, they must offer MySQL as a database server otherwise you cannot get your database installed on their servers?
Jan 02, 2012 07:39 PM|ChayaCooper|LINK
This definitely seems strange to me too and I know there must be a solution :-( They've been really unhelpful and rude, but since I'm on a deadline I'd rather not have to find another provider right now and try to get this working.
The hosting company (Premium Reseller) supports asp.net and mySQL, although I had difficulty publishing the database through WebMatrix and therefore had to upload it through phpMyAdmin.
I've included their Server in the connection string in my web.config, but the only .dll file files I have are the ones I listed :-( Is there somethng else I should be including?
Jan 02, 2012 08:42 PM|Mikesdotnetting|LINK
Your hosting provider should fix this for you. Presumably they know you are using MySQL, so they need to make sure that the appropriate provider is installed on the server, to they should tell you which MySQL provider they support if its not the one you
are currently using.
Jan 02, 2012 08:48 PM|jeremyh|LINK
You will need to add the Mysql connector dll to the bin folder -
Some good steps are at
And you can get the file from Nuget @
Jan 02, 2012 09:07 PM|ali.alakhdar|LINK
right click your database ane see properties ... there you ahould find the provider
Jan 02, 2012 09:32 PM|ChayaCooper|LINK
I've included the info it listed in the properties below, but I'm not sure who the provider is. Would that be phpMyAdmin?
Protocol: HyperText Transfer Protocol
Type: PHP File
Jan 02, 2012 09:56 PM|ChayaCooper|LINK
I just added the MySql.Data.MySqlClient dll to the bin folder (and uploaded it to my site) but it's still not working :-( Any suggestions?
Jan 02, 2012 10:06 PM|jeremyh|LINK
Sorry should have been a little clearer
Copy the MySql.Data.dll file to your application's /bin directory on the server
Define the connectionstring to the database
and add Imports or using for MySql.Data.MySqlClient to the page or web.config
Jan 02, 2012 10:10 PM|ChayaCooper|LINK
Based on dturnerblog's posting I figured I should double check that I'm doing the basics properly -
I changed the server name in the web.config file from localhost to my hosting company's server name, and have included the code from the file below. Is this correct?
<add connectionString="Server=ns52.premiumdns.net;Database=c2f_demo_dec2011;Uid=username;Pwd=password" name="Demo1" providerName="MySql.Data.MySqlClient" />
Jan 02, 2012 10:26 PM|ChayaCooper|LINK
I know I must have done something wrong, so just to clarify those steps -
Is that what you meant?
Jan 03, 2012 09:48 AM|jeremyh|LINK
These are the steps I have used before, first add nuget package Mysql.Data to website.
Then add a using statement to the database pages
And then in the web.config add
<add connectionString="Server=localhost;Database=web999-mydata;Uid=web999-mydata;Pwd=password" name="web999-mydata" providerName="MySql.Data.MySqlClient" />
<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.4.4, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
Then upload the website with the bin folder dll's and all should be working.
Jan 03, 2012 06:28 PM|ChayaCooper|LINK
It worked! Thank you so much!!!
Jan 04, 2012 06:23 AM|carl.steinhart|LINK
I believe you should ask your provider to fix this issue. Or I would recommend you to find another provider at
http://www.microsoft.com/web/Hosting/Home, HostForLife.eu seems good option. Good luck