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