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

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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 April 12th, 2015, 02:50 PM
Registered User
 
Join Date: Apr 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7 - MySQL Connection Error

Hello,

Stuck on adding a menu to the site exercise. I receive the following error even when trying to compile the downloaded source for chapter 7.

Server Error in '/Chapter 07' 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 'PCName' is not allowed to connect to this MySQL server

Source Error:
Code:
Line 274:    <siteMap>
Line 275:      <providers>
Line 276:        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/"/>
Line 277:      </providers>
Line 278:    </siteMap>
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Conf ig\machine.config Line: 276

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

Any assistance would be much appreciated!
 
Old April 12th, 2015, 04:06 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you post this in the correct forum category? The ASP.NET book doesn't use MySQL.

That said, it sounds like a security issue. Not sure how to fix it as I have little experience with MySQL.

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 April 12th, 2015, 04:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Oh, this:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Conf ig\machine.config Line: 276

seems to suggest it's a global issue. Looks like you installed a separate sitemap provider for MySQL? That seems to have broken your sites. Try uninstalling, or create a backup of the said file and then remove the references to the MySQL Provider. Not familiar with it so I am not sure what it adds to machine.config.

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 April 12th, 2015, 04:51 PM
Registered User
 
Join Date: Apr 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I deleted my machine.config and restored the default. Everything seems to be working properly now. Thanks for the prompt response!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: com.mysql.jdbc.Connection cannot be cast to java.sql.Statement Marielos_Cornejo Java Basics 2 September 21st, 2009 01:26 AM
MySQL hibernate connection error kadimijagan Hibernate 2 May 11th, 2009 06:31 AM
MySQL lost connection error melkin Classic ASP Basics 1 October 27th, 2007 06:37 AM
connection error MYSQL and ASP renee_santoscoi MySQL 5 March 7th, 2005 11:15 AM





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