title: MVC controller.Execute with areas
body: <p>I've a site in MVC4 using areas. In some area (lets call it Area), I have a controller (Controller) with this actions:</p>
  
  <pre><code>public ActionResult Index()
  {
      return View();
  }
  
  public ActionResult OtherAction()
  {
      return View("Index");
  }
  </code></pre>
  
  <p>This works great if I make a simple redirect to Area/Controller/OtherAction like this:</p>
  
  <pre><code>return RedirectToAction("OtherAction", "Controller", new { area = "Area" });
  </code></pre>
  
  <p>But I need (<a href="https://stackoverflow.com/a/620559/310276">check here why</a>) to make a redirect like this:</p>
  
  <pre><code>RouteData routeData = new RouteData();
  routeData.Values.Add("area", "Area");
  routeData.Values.Add("controller", "Controller");
  routeData.Values.Add("action", "OtherAction");
  ControllerController controller = new ControllerController();
  controller.Execute(new RequestContext(new HttpContextWrapper(HttpContext.ApplicationInstance.Context), routeData));
  </code></pre>
  
  <p>And in that case it doesn't work. After the last line, the OtherAction method is executed and then in the last line of this code it throws this exception:</p>
  
  <blockquote>
    <p>The view 'Index' or its master was not found or no view engine
    supports the searched locations. The following locations were
    searched:</p>
    
    <p>~/Views/Controller/Index.aspx</p>
    
    <p>~/Views/Controller/Index.ascx</p>
    
    <p>~/Views/Shared/Index.aspx</p>
    
    <p>~/Views/Shared/Index.ascx</p>
    
    <p>~/Views/Controller/Index.cshtml</p>
    
    <p>~/Views/Controller/Index.vbhtml</p>
    
    <p>~/Views/Shared/Index.cshtml</p>
    
    <p>~/Views/Shared/Index.vbhtml</p>
  </blockquote>
  
  <p>Why is this happening and how can I fix it?</p>