I created a Area in my MVC 3 application called \'Blog\'.
In global.asax I have the following code.
public static void RegisterRoutes(RouteCollection
I had the same issue as Mindstorm Interactive, and took a slightly different approach. Yes, it does redirect the user, but it made my code look less workaroundy so to speak.
I created a new controller, no matter in what area, since the problem is within the renderer not finding the view, not the controller.
The controller then redirects with the area (as in Mindstroms fix, the key) included, and voila.
public class StartController : Controller
{
public ActionResult Index()
{
return RedirectToAction("Index", "MyController", new { area = "MyArea" });
}
}
in the RouteConfig just add
routes.MapRoute(name: "Root", url: "", defaults: new { controller = "Start", action = "Index", area = "MyArea" });
Hope it helps someone.