0

I am using Sitecore.NET 10.1.1 (rev. 005862). I created an empty list in List Manager. When I am trying to create a new contact

enter image description here

nothing is happened and in the logs I have error:

844 11:00:44 ERROR Application error.

Exception: System.InvalidOperationException

Message: The matched route does not include a 'controller' route value, which is required.

Source: System.Web.Mvc

at System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext requestContext)

at System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext requestContext)

at Sitecore.Mvc.Routing.RouteHandlerWrapper.GetHttpHandler(RequestContext requestContext)

Any help will be appreciated.

1 Answer 1

0

The issue was in custom pipeline - AbortSitecoreForKnownRoutes. The request from api/sitecore was also processing, but is shouldn't be. I updated my code to not process api/sitecore request

 public class AbortSitecoreForKnownRoutes : HttpRequestProcessor
    {
        public override void Process(HttpRequestArgs args)
        {
            var routeCollection = RouteTable.Routes;
            var httpContext = args.HttpContext.ApplicationInstance.Context;
            var routeData = routeCollection.GetRouteData(new HttpContextWrapper(httpContext));

            if (routeData == null || args.Url.ItemPath.Contains("api/sitecore")) return;

            HttpContext.Current.RemapHandler(routeData.RouteHandler.GetHttpHandler(HttpContext.Current.Request.RequestContext));
            args.AbortPipeline();
        }
    }

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.