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:


Line 26:     
Line 27:     // find view
Line 28:     view = views[item.GetString("Type")];
Line 29: }
Line 30: @Html.FrontHtml().RenderView(view) 

Source File: c:\Web\mcms4\Cms_Data\Sites\OpcinaStubickeToplice\Templates\Views\Content.Page\template.cshtml    Line: 28

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +38
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +54
   ASP._Page_Cms_Data_Sites_opcinastubicketoplice_Templates_Views_Content_Page_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\OpcinaStubickeToplice\Templates\Views\Content.Page\template.cshtml:28
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +162
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderViewInternal(HtmlHelper htmlHelper, String viewPath, ViewDataDictionary viewData, Object model) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderView(HtmlHelper htmlHelper, Page_Context pageContext, String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:66
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:395
   Kooboo.CMS.Sites.View.<>c__DisplayClass28_0.<RenderView>b__0() in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:221
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(ViewPosition viewPosition) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:245
   Kooboo.CMS.Sites.View.<RenderPositionContents>d__24.MoveNext() in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:159
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +158
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +93
   Kooboo.CMS.Sites.View.FrontHtmlHelper.Position(String positionID, Func`1 defaultContentFunc) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:124
   ASP._Page_Cms_Data_Sites_opcinastubicketoplice_Templates_Views_Data_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\OpcinaStubickeToplice\Templates\Views\Data\template.cshtml:44
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +162
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderViewInternal(HtmlHelper htmlHelper, String viewPath, ViewDataDictionary viewData, Object model) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderView(HtmlHelper htmlHelper, Page_Context pageContext, String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:66
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:395
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:382
   ASP._Page_Cms_Data_Sites_opcinastubicketoplice_Templates_Layouts_index_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\OpcinaStubickeToplice\Templates\Layouts\index\template.cshtml:3
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +162
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   Kooboo.CMS.Sites.Controllers.PageControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\Controllers\PageControllerActionInvoker.cs:29
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +659
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +42
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +59
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +44
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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