The given key was not present in the dictionary

Posted by Community Admin on 04-Aug-2018 17:55

The given key was not present in the dictionary

All Replies

Posted by Community Admin on 22-Nov-2014 00:00

I was given a project that runs on SF 4.4 to make some changes. I can't seem to be able to get this stable and run. When I run through casini I getThe given key was not present in the dictionary & when I run on IIS I get 500 - Internal server error. The site is on Windows Server 2008 & runs on SQL 2008R2. Here is the stack trace on running through casini

 Server Error in '/' Application.

The given key was not present in the dictionary.

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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

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: 


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +10629801
   System.Collections.ObjectModel.KeyedCollection`2.get_Item(TKey key) +10771760
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadAttributes(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew) +278
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +146
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +215
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +94
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +54
   Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +157
   Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +16
   Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +154
   Telerik.Sitefinity.Configuration.Config.Get() +35
   Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute..cctor() +19

[TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute' threw an exception.]
   BuildUp_Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute(IBuilderContext ) +94
   Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +10
   Telerik.Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +188
   Telerik.Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +185
   Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +158

[ResolutionFailedException: Resolution of the dependency failed, type = "Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute", name = "(none)".
Exception occurred while: Calling constructor Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute().
Exception is: TypeInitializationException - The type initializer for 'Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute' threw an exception.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute,(none)
  Calling constructor Telerik.Sitefinity.Modules.Libraries.Web.LibraryRoute()
]
   Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +322
   Telerik.Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) +15
   Telerik.Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, ResolverOverride[] overrides) +72
   Telerik.Sitefinity.Abstractions.ObjectFactory.Resolve() +72
   Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +2054
   Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +303
   Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +129
   System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
   System.Web.HttpApplication.InitModulesCommon() +80
   System.Web.HttpApplication.InitModules() +64
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +792
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +336
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +525

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

 

Any help is much appreciated

 

Cory

 

Posted by Community Admin on 26-Nov-2014 00:00

Hi Roger,

The exception you are getting is due to missing configurations for your solution. I have reason to believe it may be due to some lazy config entries inside your config files. What you can do is to try and create a blank 4.4 project and match the files in the App_Data/Sitefinity/Configuration folder to the ones in your inherited project. 

Provided you are unable to identify the exact reason for your exception I can suggest you open a support ticket where me or one of my teammates can request the site and review it in further depth.

Regards,
Ivan D. Dimitrov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed