Errors in Event Viewer

Topics: Business Logic Layer
Mar 4, 2011 at 3:15 PM

Hello,

I just upgraded to 2.0 and now I am receiving a ton of these messages in my Event Viewer. When I go the that page everything looks good. Any thoughts?

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/4/2011 8:44:19 AM
Event time (UTC): 3/4/2011 2:44:19 PM
Event sequence: 3448
Event occurrence: 30
Event detail code: 0
 
Exception information:
    Exception type: ArgumentException
    Exception message: An item with the same key has already been added.
 
Request information:
    Request URL: http://cincinnati.md/Blogs/post.aspx?id=47208dc6-0650-4fbc-b4b0-5461925dce96
    Request path: /Blogs/post.aspx
    User host address: 110.73.7.114
    User: 
    Is authenticated: False
    Authentication Type: 
 
Thread information:
    Thread ID: 24
    Is impersonating: False
    Stack trace:    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at App_Code.Controls.RelatedPosts.CreateList(IEnumerable`1 relatedPosts)
   at App_Code.Controls.RelatedPosts.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at ASP.themes_standard_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at BlogEngine.Core.Web.Controls.BlogBasePage.Render(HtmlTextWriter writer) in E:\Projects\BlogEngine-HG-10\Source\BlogEngine\BlogEngine.Core\Web\Controls\BlogBasePage.cs:line 467
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

Mar 4, 2011 at 4:37 PM
Edited Mar 4, 2011 at 4:38 PM

App_Code.Controls.RelatedPosts Exception, do not have it anymore, since I modified RelatedPosts.cs as suggested in http://blogengine.codeplex.com/workitem/12084 :

In RelatedPosts.cs change this:
   var description = post.Description;
To this:
   var description = Utils.StripHtml(post.Description);

Jun 1, 2013 at 3:15 PM
It seems like this error has not been fixed and it has shipped in the latest version of Microsoft WebMatrix. Therefore the first time you open it up, it throws the error and you have to go to RelatedPost.cs and perform the fix.