1

when I'm trying to run blogengine with new theme i just got this error now i can't get run the BE2.5 here is the error

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

i think something wrong data in database because same copy with another database work please help me to fix this issue.

and here is the stack trace

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

thanks

1 Answer 1

2

This is just an idea.

There's a settings.xml file somewhere. Edit it, and see if there are two (or more) tags named enablereferrertracking. Delete until there's only one, and see if that helped.

You have to restart the app-domain, since it loads files into memory. So either iisreset, or close the development web-server or whatever you use.

3
  • i'm using mssql for datastore also did delete the entry. but not working.
    – Gayan
    Jul 16, 2011 at 4:08
  • but the tip was help me to check be_Setting table on sql after deleted all the redundant values now work pretty good thanks MartinHN
    – Gayan
    Jul 16, 2011 at 4:33
  • 1
    Cool. You could modify BlogSettings class, to check the dictionary for an item before adding it. Would add nice robustness to the app. Maybe even delete the entry, if it has already been added.
    – MartinHN
    Jul 16, 2011 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.