BlogEngine 2.5 Version Error : Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Dec 21, 2011 at 9:42 AM

Server Error in '/Blog' Application.

Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts'

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.ArgumentException: Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts'

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ArgumentException: Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts']
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +9352427
System.Collections.Hashtable.Add(Object key, Object value) +11
System.Collections.Specialized.StringDictionary.Add(String key, String value) +60
BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:1097
BlogEngine.Core.BlogSettings.Load() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:1301
BlogEngine.Core.BlogSettings..ctor() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:84
BlogEngine.Core.BlogSettings.GetInstanceSettings(Blog blog) in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:117
BlogEngine.Core.Web.HttpModules.WwwSubDomainModule.ContextBeginRequest(Object sender, EventArgs e) in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\Web\HttpModules\WwwSubDomainModule.cs:118
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Dec 21, 2011 at 9:43 AM
ramana12 wrote:

 

Server Error in '/Blog' Application.

Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts'

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.ArgumentException: Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts'

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ArgumentException: Item has already been added. Key in dictionary: 'displayratingsonrecentposts' Key being added: 'displayratingsonrecentposts']
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +9352427
System.Collections.Hashtable.Add(Object key, Object value) +11
System.Collections.Specialized.StringDictionary.Add(String key, String value) +60
BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:1097
BlogEngine.Core.BlogSettings.Load() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:1301
BlogEngine.Core.BlogSettings..ctor() in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:84
BlogEngine.Core.BlogSettings.GetInstanceSettings(Blog blog) in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\BlogSettings.cs:117
BlogEngine.Core.Web.HttpModules.WwwSubDomainModule.ContextBeginRequest(Object sender, EventArgs e) in E:\Projects\BlogEngine_25_Release\BlogEngine\DotNetSlave.BusinessLogic\Web\HttpModules\WwwSubDomainModule.cs:118
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

 

ANY SUGGESTIONS ???

Apr 13, 2012 at 12:19 PM
Edited Apr 15, 2012 at 9:38 AM

I found a solution to this.....
I answered it on my blog:  http://beemerguy.net/blog/post.aspx?id=73403481-9b77-4cb7-a11b-4d9554f895c7 

Apr 14, 2012 at 9:52 AM
Edited Apr 15, 2012 at 9:38 AM

The link I gave above was for the SQL setup of BlogEngine.NET.
I wrote another post for the XML setup (more popular):  http://beemerguy.net/blog/post.aspx?id=2b6334f5-a276-49a4-bbf5-838d4506f8c2

Mar 19, 2014 at 6:26 AM
I am getting a similar error. Your blog is not accessible. Please provide me hints how to solve this.
[ArgumentException: Item has already been added. Key in dictionary: 'description'  Key being added: 'description']
   System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +14662257
   BlogEngine.Core.Providers.DbBlogProvider.LoadSettings(Blog blog) +507
   BlogEngine.Core.BlogSettings.Load(Blog blog) +98
   BlogEngine.Core.BlogSettings.GetInstanceSettings(Blog blog) +493
   BlogEngine.Core.Web.HttpModules.WwwSubDomainModule.ContextBeginRequest(Object sender, EventArgs e) +123
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
Thanks in advance.
Coordinator
Mar 19, 2014 at 4:06 PM
If you using database, check be_settings table for duplicates.