ASP.NET cannot find MySQL host, although I do not use MySQL

I am trying to start and run a simple web page that uses TreeView as well as SiteMapDataSource. TreeView is a list of links in a web application. My site navigation data source is an XML file (Web.sitemap).

When I run this application in my web browser, I get an error: "Unable to connect to any of the specified MySQL nodes."

He says my error is on line 285:

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

I do not use MySQL or any DBMS for my site map, so I'm not sure why I get this error. I installed MySQL on my system, as well as plugins for Visual Studio 2015, so what could be the problem?

Thanks.

+6
source share
6 answers

I have the same problem on BlogEngine after installing another site using the WordPress app. The WordPress installation included installing MySql and writing to the .NET Machine.config file. This is on Windows Server 2012 R2. You can delete the entry from the device configuration, but this can cause problems elsewhere. I decided to add the Remove key in the BlogEngine Web.Config file.

 <siteMap defaultProvider="PageSiteMap" enabled="true"> <providers> <remove name="MySqlSiteMapProvider" /> ... </providers> </siteMap> 

This solved the problem.

+17
source

I monitored the location of the source file: C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config \ machine.config and scrolled to line 285. I deleted the MySQL data and around that line of code. Uninstall my application again and it works fine:

enter image description here

+2
source

Somehow, "MySQL.Net Connector" was installed on our server. I deleted it using the control panel / programs and features, and the problem was resolved.

+1
source

Inside <system.web> add this; As shown below:

 <system.web> ... <siteMap> <providers> <remove name="MySqlSiteMapProvider" /> </providers> </siteMap> <system.web> 
+1
source
 <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" /> 

this defines the mySQL data source using connectionString named LocalMySqlServer. An exception will be thrown because your application cannot connect to the server defined in this connection string.

0
source
 <siteMap> <providers> <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" /> </providers> </siteMap> 

First go to the control panel, delete MYSQL CONNECTOR You can go> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

Delete the following and try ,

  <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" /> 
0
source

All Articles