I am trying to get a simple web page up and running, which uses TreeView as well as an SiteMapDataSource. The TreeView is to list links on the web application. My data source for the site navigation is an XML file (Web.sitemap).
When I run this application in my web browser, I get the error: "Unable to connect to any of the specified MySQL hosts."
It 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 am not using MySQL or any RDBMS for my sitemap, so I am not sure why I am getting this error. I did Install MySQL onto my system, as well as the plugins for Visual Studio 2015, so could this be the problem?
Thanks.
I got the same problem in a BlogEngine site after installing another site with a WordPress application. The installation of WordPress included the installation of MySql, and an entry in the .NET Machine.config file. This is in a Windows Server 2012 R2. You can remove the entry from the machine configuration, but that might cause problems somewhere else. I opted to add a Remove key in the BlogEngine Web.Config file.
Note: added location in configuration file.
<system.web>
<siteMap defaultProvider="PageSiteMap" enabled="true">
<providers>
<remove name="MySqlSiteMapProvider" />
...
</providers>
</siteMap>
</system.web>
This solved the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With