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</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: #00008b; background: transparent;">return</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: #2b91af; background: transparent;">CurrentUmbracoPage</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;">}</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; background: transparent;">
}}
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/60465-getting-no-route-in-the-route-table-matches-the-supplied-values-for-surfacecontroller-after-upgrade-from-v4