Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 December 29th, 2006, 01:11 PM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error After Deleting Polls

I deleted the default polls using the admin interface (no messing around with data model) and the
Polls control is hacking up blood everywhere:

Somewhere it has the ID cached of poll "24" (the What is your favorite beer poll). Where is the store getting the information for the current poll?

I can get around this catastrophic error (every page in the site) by hard coding the pollid in the pollbox.ascx.vb in DoBinding just before the if pollID > -1 then statement:

  If pollID = 24 Then pollID = 28 '(My new forum)

Otherwise I get this on every page:

----------------------------------------------------------
Server Error in '/' Application.

Value cannot be null.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value

Source Error:



Line 56: ' Cache the input data, if caching is enabled
Line 57: Public Shared Sub CacheData(ByVal key As String, ByVal data As Object)
Line 58: BizObject.Cache.Insert(key, data, Nothing, DateTime.Now.AddSeconds(Settings.CacheDuration), TimeSpan.Zero)
Line 59: End Sub
Line 60: End Class

Source File: E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\B asePoll.vb Line: 58

Stack Trace:



[ArgumentNullException: Value cannot be null.
Parameter name: value]
   System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, Boolean isPublic) +3503343
   System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace) +88
   System.Web.Caching.Cache.Insert(String key, Object value, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan slidingExpiration) +79
   MB.TheBeerHouse.BLL.Polls.BasePoll.CacheData(Strin g key, Object data) in E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\B asePoll.vb:58
   MB.TheBeerHouse.BLL.Polls.Poll.GetPollByID(Int32 pollID) in E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\P oll.vb:178
   MB.TheBeerHouse.UI.Controls.PollBox.DoBinding() in E:\web\servernamecom00\htdocs\Controls\PollBox.asc x.vb:121
   MB.TheBeerHouse.UI.Controls.PollBox.Page_Load(Obje ct sender, EventArgs e) in E:\web\servernamecom00\htdocs\Controls\PollBox.asc x.vb:95
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


  #2 (permalink)  
Old December 30th, 2006, 09:49 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you delete the pollID 24 from the Template.master?

  #3 (permalink)  
Old December 30th, 2006, 10:12 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent. <Rubbing hands together gleefully.>

Thank you.

  #4 (permalink)  
Old February 7th, 2007, 12:18 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you have a solution to this poll box problem? One for someone with limited knowledge of coding? Thank you so much.


Quote:
quote:Originally posted by CrassMaestro
 I deleted the default polls using the admin interface (no messing around with data model) and the
Polls control is hacking up blood everywhere:

Somewhere it has the ID cached of poll "24" (the What is your favorite beer poll). Where is the store getting the information for the current poll?

I can get around this catastrophic error (every page in the site) by hard coding the pollid in the pollbox.ascx.vb in DoBinding just before the if pollID > -1 then statement:

If pollID = 24 Then pollID = 28 '(My new forum)

Otherwise I get this on every page:

----------------------------------------------------------
Server Error in '/' Application.

Value cannot be null.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value

Source Error:



Line 56: ' Cache the input data, if caching is enabled
Line 57: Public Shared Sub CacheData(ByVal key As String, ByVal data As Object)
Line 58: BizObject.Cache.Insert(key, data, Nothing, DateTime.Now.AddSeconds(Settings.CacheDuration), TimeSpan.Zero)
Line 59: End Sub
Line 60: End Class

Source File: E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\B asePoll.vb Line: 58

Stack Trace:



[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, Boolean isPublic) +3503343
System.Web.Caching.CacheInternal.DoInsert(Bo olean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace) +88
System.Web.Caching.Cache.Insert(String key, Object value, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan slidingExpiration) +79
MB.TheBeerHouse.BLL.Polls.BasePoll.CacheData (String key, Object data) in E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\B asePoll.vb:58
MB.TheBeerHouse.BLL.Polls.Poll.GetPollByID(I nt32 pollID) in E:\web\servernamecom00\htdocs\App_Code\BLL\Polls\P oll.vb:178
MB.TheBeerHouse.UI.Controls.PollBox.DoBindin g() in E:\web\servernamecom00\htdocs\Controls\PollBox.asc x.vb:121
MB.TheBeerHouse.UI.Controls.PollBox.Page_Loa d(Object sender, EventArgs e) in E:\web\servernamecom00\htdocs\Controls\PollBox.asc x.vb:95
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolea n includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


 


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
Error When Deleting Recordset arimakidd Classic ASP Databases 3 May 22nd, 2006 10:59 AM
error in deleting,updating and records in asp method Classic ASP Databases 1 May 6th, 2005 10:35 AM
Error: Polls.Config already exists. Goss444 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 7th, 2004 09:44 PM



All times are GMT -4. The time now is 01:27 PM.


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