Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 March 13th, 2007, 02:41 PM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error to instanciate Globals.Settings.Articles

Dear All

I am re-writing the code in the book and creating a website of my own, and I just finished Chapter 5. However after compiling and running the code, its giving me an error in this part:-

Line 43: protected static ArticlesElement Settings
Line 44: {
Line 45: get { return Globals.Settings.Articles; }
Line 46: }
Line 47:

Its telling me that Object Reference not set to an instance of an object.

I think I followed the code piece by piece, however I cannot seem to find where the error is.

I also downloaded the code for the book and its working fine on his example.

Can you please help me out?

Thanks

Johann

 
Old March 14th, 2007, 10:58 AM
Registered User
 
Join Date: Feb 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the Config section make sure you have a property named Articles which maps to the Beerhouse section in your web.config.

Then check your web.config file under <theBeerHouse> or whatever you used in web.config and you should have something like the bottom of page 218.

Also in the config section make sure you have a class named ArticlesElement that inherits from ConfigurationElement like on the bottom of page 216.

 
Old March 14th, 2007, 11:13 AM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi thanks

I solved my problem

instead of <theBeerHouse> i put <TheBeerHouse>

Thanks

Johann






Similar Threads
Thread Thread Starter Forum Replies Last Post
Recent articles not showing on articles page kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 December 16th, 2006 10:06 AM
Error on Browse articles page kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 27th, 2006 03:14 PM
error on articles kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 October 4th, 2006 02:42 PM
Instanciate .net assembly as com object from ASP Ian Ohlander Classic ASP Components 0 April 15th, 2004 11:54 AM
Error with variable..maybe register globals codefinder Beginning PHP 1 November 19th, 2003 03:31 PM





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