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 May 31st, 2008, 09:14 PM
Authorized User
 
Join Date: Apr 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default I get an error when running ManageDepartments.aspx

I get this error when compiling ManageDepartments.aspx. Any ideas on what could be causing this? Thanks for the help!

Code:
Line 48:         Protected Shared ReadOnly Property Settings() As StoreElement
Line 49:             Get
Line 50:                 Return Globals.Settings.Store
Line 51:             End Get
Line 52:         End Property
 

Source File: D:\Documents and Settings\username\My Documents\Visual Studio 2005\WebSites\book\App_Code\BLL\Store\BaseStore.vb    Line: 50 

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   MB.TheBeerHouse.BLL.Store.BaseStore.get_Settings() in D:\Documents and Settings\username\My Documents\Visual Studio 2005\WebSites\book\App_Code\BLL\Store\BaseStore.vb:50
   MB.TheBeerHouse.BLL.Store.Department.GetDepartments() in D:\Documents and Settings\username\My Documents\Visual Studio 2005\WebSites\book\App_Code\BLL\Store\Department.vb:104
 
Old May 31st, 2008, 10:45 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

You need to define a StoreElement class in your ConfigSections.cs file.

 
Old June 1st, 2008, 12:00 AM
Authorized User
 
Join Date: Apr 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have already defined the StoreElement class in the ConfigSections file. Just like the book example shows it contains the following ConfigurationProperties:
(connectionStringName, connectionString, ProviderType, RatingLockInterval, PageSize, rssItems, DefaultOrderListInverval, SandboxMode, BusinessEmail, CurrencyCode, LowAvailability, EnableCaching, CacheDuration)





Similar Threads
Thread Thread Starter Forum Replies Last Post
AmbiguousMatchException running the .aspx BrianWren VB.NET 2002/2003 Basics 3 December 15th, 2005 12:18 PM
AmbiguousMatchException running the .aspx BrianWren ASP.NET 1.0 and 1.1 Professional 0 December 8th, 2005 02:30 PM
AmbiguousMatchException running the .aspx BrianWren ASP.NET 1.0 and 1.1 Basics 0 December 8th, 2005 02:30 PM
AmbiguousMatchException running the .aspx BrianWren Pro VB.NET 2002/2003 0 December 7th, 2005 04:41 PM
Running an aspx file mahulda ASP.NET 1.0 and 1.1 Basics 5 March 27th, 2004 01:07 AM





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