Key cannot be null error on upgrade to the latest MVC wrappers

2 posts, 0 answers
  1. Jason Mobley
    Jason Mobley avatar
    6 posts
    Member since:
    Nov 2009

    Posted 02 Dec 2013 Link to this post

    I just updated my solution to the latest release of Kendo and the MVC wrappers. Everything is working exactly as it did before except the tool tip which is now throwing the following error. Does anyone know why this has started and what the solution is? Included first is my code, and then the error thrown.

    <div id="quick-menu">
        <ul>
            <li id="qm-progress">
                <a href="#">@this.GetTermProvider().GetValue("PROGRESS_LEGEND")</a>
            </li>
            <li id="qm-status">
                <a href="#">@this.GetTermProvider().GetValue("STATUS_LEGEND")</a>
            </li>
            <li id="qm-message">
                <a href="#">@this.GetTermProvider().GetValue("MESSAGES")</a>
            </li>
        </ul>
    </div>

    <script id="qm-progress-template" type="text/x-kendo-template">
        @Html.Action("QuickMenuProgress", "Shared")
    </script>


    @(Html.Kendo().Tooltip()
          .For("#qm-progress")
          .Filter("a")        
          .ContentTemplateId("qm-progress-template")
          .Position(TooltipPosition.Top)
          .Deferred()
          .Width(250)
          .Height(100)
    )


    @(Html.Kendo().Tooltip()
          .For("#qm-status")
          .Filter("a")        
          .ContentTemplateId("qm-status-template")
          .Position(TooltipPosition.Top)
          .Deferred()
          .Width(250)
          .Height(100)
    )

    <script id="qm-status-template" type="text/x-kendo-template">
        @Html.Action("QuickMenuStatus", "Shared")
    </script>

    ------------------------------

    Server Error in '/' Application.Key cannot be null.
    Parameter name: keyDescription: 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.ArgumentNullException: Key cannot be null.
    Parameter name: key

    Source Error: 

    Line 19:
    Line 20:
    Line 21: @(Html.Kendo().Tooltip()
    Line 22: .For("#qm-progress")
    Line 23: .Filter("a")
    Source File: c:\EPM\v6.0\Source\Presentation\Web\Views\Shared\QuickMenu.cshtml    Line: 21 

    Stack Trace: 

    [ArgumentNullException: Key cannot be null.
    Parameter name: key]
    System.Collections.Hashtable.ContainsKey(Object key) +149
    System.Collections.Hashtable.Contains(Object key) +38
    System.Collections.Specialized.OrderedDictionary.set_Item(Object key, Object value) +136
    Kendo.Mvc.UI.WidgetBase.AppendScriptToContext(String script) +263
    Kendo.Mvc.UI.WidgetBase.WriteDeferredScriptInitialization() +110
    Kendo.Mvc.UI.WidgetBase.WriteHtml(HtmlTextWriter writer) +82
    Kendo.Mvc.UI.WidgetBase.ToHtmlString() +115
    Kendo.Mvc.UI.Fluent.TooltipBuilder.ToHtmlString() +52
    System.Web.HttpUtility.HtmlEncode(Object value) +91
    System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, Object content) +48
    System.Web.WebPages.WebPageBase.Write(Object value) +53
    ASP._Page_Views_Shared_QuickMenu_cshtml.Execute() in c:\EPM\v6.0\Source\Presentation\Web\Views\Shared\QuickMenu.cshtml:21
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +271
    System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +121
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +191
    System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +763
    System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +383
    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +432
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
    System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +78
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +388
    System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +303
    System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +155
    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +184
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +137
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +66
    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +48
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +68
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +65
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39
    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +48
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +66
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
    System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +51
    System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +41
    System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +69
    System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +123
    System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +133
    System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1743

    [HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
    System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +3544
    System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +151
    System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +122
    System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +61
    System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +985
    System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +112
    System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName) +46
    ASP._Page_Views_Shared__RootLayout_cshtml.<Execute>b__d(TextWriter __razor_template_writer) in c:\EPM\v6.0\Source\Presentation\Web\Views\Shared\_RootLayout.cshtml:153
    System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +42
    Kendo.Mvc.UI.<>c__DisplayClass7.<set_InlineTemplate>b__6(TextWriter writer) +128
    Kendo.Mvc.UI.HtmlElement.WriteTo(TextWriter output) +213
    Kendo.Mvc.UI.<>c__DisplayClass5.<WriteTo>b__3(IHtmlNode child) +45
    Kendo.Mvc.Extensions.EnumerableExtensions.Each(IEnumerable`1 instance, Action`1 action) +194
    Kendo.Mvc.UI.HtmlElement.WriteTo(TextWriter output) +333
    Kendo.Mvc.UI.Splitter.WriteHtml(HtmlTextWriter writer) +82
    Kendo.Mvc.UI.WidgetBase.ToHtmlString() +115
    Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString() +62
    System.Web.HttpUtility.HtmlEncode(Object value) +91
    System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, Object content) +48
    System.Web.WebPages.WebPageBase.Write(Object value) +53
    ASP._Page_Views_Shared__RootLayout_cshtml.Execute() in c:\EPM\v6.0\Source\Presentation\Web\Views\Shared\_RootLayout.cshtml:93
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +271
    System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +121
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +191
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer) +52
    System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +333
    System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +42
    System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +44
    System.Web.WebPages.WebPageBase.Write(HelperResult result) +52
    System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +195
    System.Web.WebPages.WebPageBase.PopContext() +342
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +200
    System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +763
    System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +383
    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +432
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
    System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +78
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +388
    System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +303
    System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +155
    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +184
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +137
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56
    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +66
    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +48
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +68
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +65
    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39
    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +48
    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +50
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +152
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
    System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +66
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +930
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +188

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440
  2. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 03 Dec 2013 Link to this post

    Hello Jason,

    We were able to identify the cause for the issue you have described and to address it. The fix will be included in the next internal build. As a temporary workaround you may consider removing the Deferred setting. I have also updated your telerik points as a token of gratitude.

    Regards,
    Rosen
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top