Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mohammad Khan 23 posts 81 karma points
    Jan 15, 2015 @ 15:56
    Mohammad Khan
    0

    Getting No route in the route table matches the supplied values for SurfaceController after upgrade from v4

    I recently upgarded our intranet Umbraco site from v4 (WebForms) to v7.2 (MVC) and now I am in the process of converting some of the usercontrols.

    I am not sure what I am missing here but I can't get this to work. I tried creating a SurfaceController in a new install of Umbraco 7.2 using Visual Studio and I had no issues but in the existing solution it refused to detect the SurfaceController.

    Calling it like so:

    @Html.Action("StatusInfo", "ServiceStatusSurface")

    using Umbraco.Web.Mvc; using System.Web.Mvc;

    namespace MyUmbracoApp.Controllers 

             public class ServiceStatusSurfaceController : SurfaceController 

            { 

               // can't reach this either: 

               public ActionResult Index() 

              { 

                  return Content("hello world"); 

              }

        // this is what I am trying to reach
        [ChildActionOnly]
        public ActionResult ServiceStatusInfo()
        {
           // do some stuff to get the status
    
            return CurrentUmbracoPage();
        }
    }

    }

  • Mohammad Khan 23 posts 81 karma points
    Jan 15, 2015 @ 16:00
    Mohammad Khan
    0

    Also posted about this on stackoverflow.

  • Mohammad Khan 23 posts 81 karma points
    Jan 29, 2015 @ 18:16
    Mohammad Khan
    0

    I am still struggling with this issue have not been able to figure it out. I keep getting this error (NOTE: The first post has a typo for the action name which occurred during copy and pasting):

    Server Error in '/' Application.
    
    No route in the route table matches the supplied values.
    
    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.InvalidOperationException: No route in the route table matches the supplied values.
    
    Source Error: 
    
    
    Line 26: @Html.Action("ServiceStatusInfo", "ServiceStatusSurface")    
    
    Source File: c:\inetpub\wwwroot\DCASConnect\MyApp\Views\MasterPage2.cshtml    Line: 26 
    
    Stack Trace: 
    
    
    [InvalidOperationException: No route in the route table matches the supplied values.]
       System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +897
       System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +123
       ASP._Page_Views_MasterPage2_cshtml.Execute() in c:\inetpub\wwwroot\MyApp\MyApp\Views\MasterPage2.cshtml:26
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +89
       System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +233
       System.Web.WebPages.WebPageBase.PopContext() +291
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +140
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
    
Please Sign in or register to post replies

Write your reply to:

Draft