Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 14th, 2016, 08:20 PM
Registered User
 
Join Date: Aug 2016
Posts: 6
Thanks: 0
Thanked 4 Times in 3 Posts
Default Chapter 7: Configuration Error

Hi everyone,
i'm studying beginning ASP.NET 4.5.1 in C# and VB. In chapter 7 page 250 step 10. after adding a menu and populating it with the sitemap, on viewing it on all browsers i've on my computer it displayed a configuration error. i carefully followed all the steps from 1 to 10 but its still not displaying the menu. below is what the error message says. what's do you think is wrong?

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: Host 'xxxxx' is not allowed to connect to this MySQL server

Source Error:

HTML Code:
Line 283:    <siteMap>
Line 284:      <providers>
Line 285:        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 286:      </providers>
Line 287:    </siteMap>

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


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1586.0
 
Old September 16th, 2016, 03:53 PM
Registered User
 
Join Date: Aug 2016
Posts: 6
Thanks: 0
Thanked 4 Times in 3 Posts
Default Configuration Error Resolved

I resolved the issue by putting this code in the web.config file.
I believe this may help others having the same problem

HTML Code:
<system.web>
 ...
  <siteMap>
    <providers>   
        <remove name="MySqlSiteMapProvider" />
    </providers>
  </siteMap>
</system.web>
The Following 2 Users Say Thank You to zinedu5 For This Useful Post:
Imar (September 17th, 2016), VermeerC (March 10th, 2017)
 
Old September 17th, 2016, 05:38 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

yeah, it looks like this (broken) provider gets registered when you install a .NET connector for MySQL. Not sure which one though.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 9th, 2016, 09:36 AM
Registered User
 
Join Date: Nov 2016
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can further explain how this work?
<siteMap>
<providers>
<remove name="MySqlSiteMapProvider" />
</providers>
</siteMap>
 
Old November 13th, 2016, 08:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

When you install the NET connector for MySQL it registers a sitemap in the global machine.config. For some reason, that one is broken. By using the remove element you effectively remove the sitemap from the current application. You could also remove it from machine.config so it's gone for all applications.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 10th, 2017, 06:43 AM
Registered User
 
Join Date: Mar 2017
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default Worked for me

Thanks zinedu5, this solution worked for me as well!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuration Error - Help! jaimealvarenga BOOK: Beginning ASP.NET 4.5 : in C# and VB 1 June 5th, 2013 03:59 AM
Chapter 03- Chat Server Configuration Error danielson BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 March 27th, 2007 11:50 AM
Chapter 3 - Configuration Error davidbarbella BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 March 7th, 2007 11:18 AM
Configuration error exstream ASP.NET 2.0 Basics 1 May 6th, 2006 12:39 PM
Configuration Error johno BOOK: ASP.NET Website Programming Problem-Design-Solution 6 July 22nd, 2005 10:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.