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 December 29th, 2006, 01:11 PM
Registered User
 
Join Date: Dec 2006
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


 
Old December 30th, 2006, 09:49 AM
Authorized User
 
Join Date: Oct 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old December 30th, 2006, 10:12 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent. <Rubbing hands together gleefully.>

Thank you.

 
Old February 7th, 2007, 12:18 AM
Registered User
 
Join Date: Feb 2007
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







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





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