This is a migrated thread and some comments may be shown as answers.

"The method or operation is not implemented" with 2013.1.319.340

8 Answers 1285 Views
Menu
This is a migrated thread and some comments may be shown as answers.
David A.
Top achievements
Rank 1
David A. asked on 20 Mar 2013, 05:11 PM
Hi,

Just downloaded 2013.1.319.340 and am receiving the following error when using the menu:

"The method or operation is not implemented".

(StackTrace)
[NotImplementedException: The method or operation is not implemented.]
   System.Web.HttpRequestBase.get_HttpMethod() +29
   System.Web.Routing.<>c__DisplayClass3.<Match>b__0(String method) +25
   System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
   System.Web.Routing.HttpMethodConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +164
   System.Web.Routing.HttpMethodConstraint.System.Web.Routing.IRouteConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +22
   System.Web.Routing.Route.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +56
   System.Web.Routing.Route.ProcessConstraints(HttpContextBase httpContext, RouteValueDictionary values, RouteDirection routeDirection) +100
   System.Web.Routing.Route.GetRouteData(HttpContextBase httpContext) +178
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +233
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.RouteDataFactory(String url) +59
   Kendo.Mvc.Infrastructure.Implementation.<GetRouteData>c__AnonStorey1B.<>m__26() +13
   Kendo.Mvc.Infrastructure.Implementation.NoCache.Get(String key, Func`1 defaultValueFactory) +11
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.GetRouteData(String key, String url) +98
   Kendo.Mvc.Infrastructure.Implementation.AuthorizationContextCache.GetAuthorizationContext(RequestContext request, String controllerName, String actionName, RouteValueDictionary routeValues) +362
   Kendo.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues) +55
   Kendo.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem) +186
   Kendo.Mvc.UI.NavigatableExtensions.IsAccessible(INavigatable item, INavigationItemAuthorization authorization, ViewContext viewContext) +29
   Kendo.Mvc.UI.NavigationItemContainerExtensions.WriteItem(TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder) +197
   Kendo.Mvc.UI.<WriteHtml>c__AnonStorey76.<>m__247(MenuItem item) +24


(rest omitted for brevity)

The code is as follows:
@(Html.Kendo().Menu()
 .Name("mn-case")
 .Items(items =>
 {
items.Add().Text("Dashboard").Action("Index", "Dashboard", new { caseId = caseId, area="Case" });
}))
The route is defined as follows:
context.MapRoute("CaseIndex",
               "Case/{caseId}/{controller}",
               new { action = "Index"},
               new RouteValueDictionary { { "httpMethod", new HttpMethodConstraint("GET") }}
               );
This did not happen in previous versions and the workaround is to use Url.Action as follows:
items.Add().Text("Dashboard").Url(@Url.Action("Index", "Dashboard", new { caseId = caseId, area="Case" }));
I have many projects that use the menu and do not want to have to change them all.  Is this a problem on my end or is it Kendo?

Thank you,
David Adams

8 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 21 Mar 2013, 03:30 PM
Hello David,

 
Thank you for drawing our attention to this issue. Unfortunately, I was not able to replicate the issue locally and I will need a simple test project, which reproduces the problem. Thus I will be able to investigate the case locally and fix the issue.

As a side note, you can turn off security trimming functionality of the widget to avoid this:

@(Html.Kendo().Menu()
    .Name("menu")
    .SecurityTrimming(false)

Kind regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David A.
Top achievements
Rank 1
answered on 21 Mar 2013, 04:24 PM
Thank you for your quick response Georgi.  The problem occurs when defining the route, specifically:
new RouteValueDictionary { { "httpMethod", new HttpMethodConstraint("GET") }}
Setting SecurityTrimming=false did work, but that is just a workaround for this project :).  It would be ideal if this could be fixed.

Here is a sample project demonstrating the error. http://sdrv.ms/ZfHEqI

Thank you,
David A.

0
Georgi Krustev
Telerik team
answered on 22 Mar 2013, 10:22 AM
Hello David,

 
Thank you for the test project. We was able to investigate the problem and to address it. The issue will be fixed in the next internal build of Kendo UI. I updated your Telerik points because of the involvement.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
xclirion
Top achievements
Rank 1
answered on 10 Jul 2013, 11:48 AM
I have the same exception with a similar Stacktrace.

The version I currently use is 2013.1.514.340.
0
Daniel
Telerik team
answered on 15 Jul 2013, 08:17 AM
Hello,

Most of the methods of the HttpRequestBase were added for the service pack. Could you provide the stacktrace or a runnable sample so I can check if we have missed some method or the reason for the exception is different?

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
xclirion
Top achievements
Rank 1
answered on 15 Jul 2013, 09:03 AM
Stacktrace following:
[NotImplementedException: Die Methode oder der Vorgang ist nicht implementiert.]
   System.Web.HttpRequestBase.get_HttpMethod() +361
   RestfulRouting.RestfulHttpMethodConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +572
   System.Web.Routing.HttpMethodConstraint.System.Web.Routing.IRouteConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +453
   System.Web.Routing.Route.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +513
   System.Web.Routing.Route.ProcessConstraints(HttpContextBase httpContext, RouteValueDictionary values, RouteDirection routeDirection) +634
   System.Web.Routing.Route.GetRouteData(HttpContextBase httpContext) +806
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +783
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.RouteDataFactory(String url) +368
   Kendo.Mvc.Infrastructure.Implementation.<GetRouteData>c__AnonStorey1B.<>m__26() +321
   Kendo.Mvc.Infrastructure.Implementation.NoCache.Get(String key, Func`1 defaultValueFactory) +348
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.GetRouteData(String key, String url) +473
   Kendo.Mvc.Infrastructure.Implementation.AuthorizationContextCache.GetAuthorizationContext(RequestContext request, String controllerName, String actionName, RouteValueDictionary routeValues) +1003
   Kendo.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues) +464
   Kendo.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem) +568
   Kendo.Mvc.UI.NavigatableExtensions.IsAccessible(INavigatable item, INavigationItemAuthorization authorization, ViewContext viewContext) +368
   Kendo.Mvc.UI.NavigationItemContainerExtensions.WriteItem(TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder) +744
   Kendo.Mvc.UI.<WriteHtml>c__AnonStorey76.<>m__24B(MenuItem item) +300
   Kendo.Mvc.Extensions.EnumerableExtensions.Each(IEnumerable`1 instance, Action`1 action) +417
   Kendo.Mvc.UI.Menu.WriteHtml(HtmlTextWriter writer) +553
   Kendo.Mvc.UI.WidgetBase.ToHtmlString() +378
   Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString() +379
   JRDashboard.Helpers.HtmlMenuExtensions.Menu(HtmlHelper html) in c:\SVNRep\gg\jrdashboard\JRDashboard\JRDashboard\Helpers\HtmlMenuExtensions.cs:42
   ASP._Page_Views_Shared__Layout_cshtml.Execute() in c:\SVNRep\gg\jrdashboard\JRDashboard\JRDashboard\Views\Shared\_Layout.cshtml:17
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +499
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +348
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +486
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer) +336
   System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +581
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +308
   System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) +313
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +314
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +461
   System.Web.WebPages.WebPageBase.PopContext() +574
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +495
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +1081
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +649
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +712
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +323
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +369
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +737
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +370
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +644
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +383
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +482
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +429
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +370
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +377
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +306
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +365
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +446
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +380
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +309
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +326
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +365
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +446
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +380
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +309
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +326
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +305
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +306
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +365
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +446
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +380
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +309
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +327
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +304
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1176
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +650
This happens with the following use of Kendo Menu:
public static MvcHtmlString Menu(this HtmlHelper html)
        {
            IPrincipal user = html.ViewContext.HttpContext.User;
 
            var menuItems = new[]
            {
                new { Title = "Dashboard", Action = "Show", Controller = "Dash", RequiredRoles = AuthorizationService.PUBLIC_REQUIRED_ROLE, Order = 0},
                new { Title = "Dash-Konfiguration", Action = "Edit", Controller = "Dash", RequiredRoles = AuthorizationService.PUBLIC_REQUIRED_ROLE, Order = 1 },
                new { Title = "Benutzerrollen", Action = "Show", Controller = "Admin", RequiredRoles = AuthorizationService.ADMIN_ROLE, Order = 3 },
                new { Title = "Webservice", Action = "Show", Controller = "WebserviceAdmin", RequiredRoles = AuthorizationService.ADMIN_ROLE, Order = 2 }
            };
 
            var items = menuItems.Where(
                m => m.RequiredRoles.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                    .Any(
                        r => user.IsInRole(r) || r.Equals(AuthorizationService.PUBLIC_REQUIRED_ROLE, StringComparison.InvariantCultureIgnoreCase)
                        )
                    )
                .OrderBy(m => m.Order)
                .GroupBy(m => m.RequiredRoles)
                .ToDictionary(g => g.Key, g => g.ToList());
 
            string menuString = html.Kendo().Menu()
                .Name("menu")
                .Items(menuItemCollection =>
                    {
                        foreach ( var m in items[AuthorizationService.PUBLIC_REQUIRED_ROLE])
                        {
                            menuItemCollection.Add().Text(m.Title).Action(m.Action, m.Controller);
                        }
 
                        if (items.ContainsKey(AuthorizationService.ADMIN_ROLE))
                        {
                            menuItemCollection.Add().Text("Administration").Items(children =>
                            {
                                foreach (var m in items[AuthorizationService.ADMIN_ROLE])
                                {
                                    children.Add().Text(m.Title).Action(m.Action, m.Controller);
                                }
                            });
                        }
                    }
                )
                .ToHtmlString();
 
            return new MvcHtmlString(menuString);
        }

0
Daniel
Telerik team
answered on 17 Jul 2013, 10:18 AM
Hello,

Thank you for the additional information. It seems that the HttpMethod getter was missed in the service pack and was later added. Please try with the latest official release(Q2 2013) and let me know if the problem persists.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
xclirion
Top achievements
Rank 1
answered on 17 Jul 2013, 01:34 PM
Thank you very much. The error is fixed with the new version.
Tags
Menu
Asked by
David A.
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
David A.
Top achievements
Rank 1
xclirion
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or