Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 31st, 2008, 09:14 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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
  #2 (permalink)  
Old May 31st, 2008, 10:45 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

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

  #3 (permalink)  
Old June 1st, 2008, 12:00 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:43 AM.


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