I have a small MVC 3 app - bit of a demo ground. I have one area and thats been working fine.
I have just added another area expecting to just spin up the app and it wor
Try to add a class PostCardAreaRegistration under PostCard Area
using System.Web.Mvc;
namespace Areas.PostCard
{
public class PostCardAreaRegistration: AreaRegistration
{
public override string AreaName
{
get
{
return "PostCard";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"PostCard_default",
"PostCard/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
}
}
I ran into this when I moved a controller into an Area but forgot to update the namespace. The controller name is scoped to the Area's namespace. So "Some" in "Area" will map to App.Areas.Area.Controllers.SomeController, which didn't exist.
You were missing the controller part in your maproute