Friday, July 3, 2015

C# with MySQL Error

Recently doing a project using c# connect to MySql server. For sure the connectio is require connection driver so that I have download and install the latest version of MySql connector version (6.9.6).

This is the first time I am using c# to establish the connection with the server. Some how I hit error during the development. So now here I am to share the issues and solution. And I aware that this is MySql connector bugs.

Here the Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
 
Parser Error Message: Unable to connect to any of the specified MySQL hosts.
 
Source Error:
 

Line 283:    <siteMap>
Line 284:      <providers>
Line 285:        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 286:      </providers>
Line 287:    </siteMap>
 
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config    Line: 285

There is many solution say that if can resolve by commnet out the particular line of config in machine.config file. You may try this soltion since there is some people mention they albe to resolve it by this. The path of machine.config file as below:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config 
<!--        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, 

MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" 

connectionStringName="LocalMySqlServer" applicationName="/" /> -->
Reference: http://bugs.mysql.com/bug.php?id=74080&thanks=1&notify=71
But this solution not work for me.
So the next solution is to change the installation file by go to control panel -> program -> select MySql connector and select change. un-check the web provider and next all the way. Then the issues resolve. Hope it help.


No comments:

Post a Comment