Skip to content Skip to sidebar Skip to footer

Error Only Occurs After Publishing: "unable To Connect To Any Of The Specified Mysql Hosts."

During development the program runs fine, but once published I noticed my elements weren't populating properly. I thought at first it was a problem with the update panels, but some

Solution 1:

Make sure the connection string in the web.config file is correct

<add name="STRING_CONNECTION" connectionString="Server=[SERVER];Database=[DATA BASE NAME];Uid=[USER];Pwd=[PASSWORD];" providerName="MySql.Data.MySqlClient"/>

Solution 2:

That is a trust issue.

See http://www.marthijnvandenheuvel.com/2011/04/14/fix-net-4-socketpermission-for-mysql-driver-in-medium-trust/

Post a Comment for "Error Only Occurs After Publishing: "unable To Connect To Any Of The Specified Mysql Hosts.""