Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im reading Begging ASP.NET For Visual Studio 2015. Their forum is dead and of no help and I`m not sure how to even research this problem because Ive never come across it before.
I`ve been building the practice application that the book walk me through and have never had a problem running my application, however after I finished the last exercise following everything to the "t" when I try to run my app I get and error "Server Error In '/' Application

The message in my browser is as follows:

C#
Server Error in '/' Application.

Configuration 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.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 286:      
Line 287:    

Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config    Line: 285 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1586.0


As I`ve said this is the first time I have had this error and have no idea how to even search this. All the code behind is C#

What I have tried:

I don`t know what to try? Its an sql error but it has always worked before. I havent altered anything in the page its referring to and visual studio has no errors or warnings when I run this application
Posted
Updated 7-Sep-17 1:34am
v2

The same problem occurred when I was studying Beginning ASP.NET 4.5.1 : in C# and VB. Fortunately, user zinedu5 posted a solution that worked for me, that can be found here:

Chapter 7: Configuration Error[^]

You have to add the following code to the web.config file :

<system.web>
 ...
  <siteMap>
    <providers>   
        <remove name="MySqlSiteMapProvider" />
    </providers>
  </siteMap>
</system.web>

Hope this works for you as well!
 
Share this answer
 
Look at the error message:
Unable to connect to any of the specified MySQL hosts.
It couldn't be a lot clearer - you are trying to connect to a MySql server which doesn't exist.
At a guess, you haven't alters the example code to address your actual installation - and you can't expect the example (which has to be for everyone who reads the book) to know in advance what your specific connection and login details are!
 
Share this answer
 
Comments
Member 13026296 28-Feb-17 4:58am    
I tried to include as much detail as I could. At this point in the book I havent done anything with sql. Databases as a subject are still a few chapters ahead of where I am. I have MySQL installed on my computer but thats because I was trying to learn some SQL before I even bought my current book I have the MySQL Command Line client and the MySQL Workbench installed I assume they came as one download when I open the command line client Im met with the usual enter your password, however I dont remember making a password I just always left it blank; Now when I do that it just closes.

As far as the Application is concerned from my above question I started with a basic MVC with web forms set up and at this point in the book Ive only added a Master Page and then acouple Web Form with master pages and a couple web forms and some accompanying C# code behind. The beginning of the book is more introducing you to html... Specific to the error I mentioned above I havent even opened that page until I got the error and tried to find it. The aforementioned page should be exactly as it was when visual studio created the original template.

Obviously this is a sql problem I did get that much but my problem is I dont know how to ensure that my local server is still legit. So do I need to uninstall sql and reinstall it?

I know in the world of computers as much detail as possible is key but like I said at this point point in the book I havent done anything with databases and the book hasnt even mentioned MySQL at my current point. Thank you for your patience and any help troubleshooting my problem.
OriginalGriff 28-Feb-17 5:05am    
Then leave it until you get to databases - they are not at all trivial, and you need to understand what you are doing to fix this: we can't do that for you as we can't access your system(s) to find out the information you need to include!

Don't "jump ahead" of the book - all you will do is at best confuse yourself, at worst ingrain the wrong ideas "because it worked".
Member 13026296 28-Feb-17 5:22am    
See thats where my frustration is I havent jumped ahead last week when I did the last exercise it ran as expected and displayed the same output the book indicated it should look like. I come back this week and the last exercise I did was to add three blank web from with master page pages. literally I didnt add any code,the book said add these three pages with these names and then run the application. so from the last time my application ran to now the only difference is the addition on 3 web form with master pages with the code left as how visual studio creates it and now im getting this error and non of the pages will render in chrome I just keep getting the sql error
which is so frustrating because I cant move on because the application wont even run now I just get sql error.
However I dont think I can provide any more detail so Im kind of at an in-pass.
OriginalGriff 28-Feb-17 5:54am    
There really isn't anything we can do to help there - we can't see your system, so we can't sort out that kind of problem for you.
To be honest, if the forum is dead and the book examples don't actually work, then my feeling would be "get another book" - but a quick check says this is a Wrox book, and they are generally pretty good. And their forums is not down - I just checked and the dedicated forum for the book is up and working, as is the sample code download.
Not sure where you are looking if you don't get the forum running.
Member 13026296 28-Feb-17 6:03am    
I know thanks for trying though and no their forum is up and running I know that. What I meant is that I posted an unrelated question to the dedicated forum and never got a reply. That was a couple months ago...and I didnt mean to imply that the book was worthless or that the examples didnt work. My issue is when I did the exercise something must have happened that book didnt expect or coult account for.... like ive said several times this is the first time I have seen this error...

non the less Im assuming ill just have to start over because I have absolutely no idea what I did wrong

I dont mean to continue kicking a dead horse just wanted to respond to this last post. thanks anyways guys
Thanks. u made my day..struggling since 2 days..
I was using sqlserver whereas error reporting related to MySQL.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900