title: Cannot find the Umbraco route definition in the route values
body: <p>I'm trying to do something fairly basic, but it does not seem to work.
  I have a razor page where I call an action 'Index' in my NewsSurfaceController.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
  @{
      Layout = "Master.cshtml";
  }
  &lt;div class="row"&gt;
      &lt;h1 class="col-xs-12 col-sm-4"&gt;@CurrentPage.Name&lt;/h1&gt;
      &lt;div class="col-xs-12 col-sm-2 col-sm-offset-4 "&gt;
          @Html.ActionLink("Archief", "Archive", "NewsSurface", null, new { @class = "content-link-button-reverse" })
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  @Html.Action("Index", "NewsSurface")</code></pre>
  </div>
  </div>
  </p>
  
  <p>My newscontroller:</p>
  
  <pre><code>public class NewsSurfaceController : SurfaceController
  {
      private int itemsPerpage= 4;
  
      public ActionResult Index()
      {
          return PartialView("newslist", new NewsRepo(CurrentPage).items.Take(itemsPerpage));
      }
  
      public ActionResult Archive()
      {
         return PartialView("newslist", new NewsRepo(CurrentPage).archivedItems.Take(itemsPerpage));
      }
  
  }
  </code></pre>
  
  <p>This returns a partial view that just iterates over the items.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@inherits Umbraco.Web.Mvc.UmbracoViewPage&lt;MyProject.models.NewsItemViewModel&gt;
  
  
          @foreach (MyProject.models.NewsItem item in Model)
          {
              //displays the properties
          }</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I go to the page, it shows me the items correctly, but when I click on the actionlink it throws an error. </p>
  
  <blockquote>
    <p>Cannot find the Umbraco route definition in the route values, the request must be made in the context of an Umbraco request</p>
  </blockquote>
  
  <p>When I debug, the problem seems to be the 'CurrentPage' object. </p>
  
  <blockquote>
    <p>at Umbraco.Web.Mvc.SurfaceController.get_CurrentPage()
       at MyProject.Controllers.NewsSurfaceController.Archive() in C:\Users\thomas\Documents\Visual Studio 2015\Projects\MyProject\Controllers\NewsSurfaceController.cs:line 25
       at lambda_method(Closure , ControllerBase , Object[] )
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary<code>2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary</code>2 parameters)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult<code>2.CallEndDelegate(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase</code>1.End()
       at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.&lt;>c__DisplayClass46.b__3f()</p>
  </blockquote>
  
  <p>What am I doing wrong?
  Could anyone point me in the right direction.</p>
  
  <p>Kind regards!</p>
  
  <p>---------Edit--------</p>
  
  <p>Ok Apparently this is a bug in Umbraco.
  <a href="http://issues.umbraco.org/issue/U4-8357" rel="nofollow">Issue on the umbraco forum</a></p>