I'm having some troubles setting up two Areas in my project, I created both Areas by right clicking my project -> Add -> Area using VS 2010 Professional,
The code it generated in the *AreaRegistration.cs files is exactly as I'd expect it.
Both my areas have multiple controllers.
I've checked my global.asax.cs file and it contains what I'd expect, the following is at the bottom:
// Generated code AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes);
When I change the default generated routing info I can get it to work for a Single controller:
context.MapRoute(
"CommunityCourses_default",
"CommunityCourses/{controller}/{action}/{id}",
new {controller="NameOfController", action = "Index", id = UrlParameter.Optional }
);
The controller="NameOfController" is what I've tried adding to the generated code, but it only works for a single controller.
Edit: I renamed the namespace of my files to use PROJECTNAME.AREANAME within an area, is this causing issues? I thought it'd simplify my imports in a non-convention-breaking way.
What am I missing? I've noticed a lot of problems about areas on SO and tried to follow the answers without success. This issue has bothered eluded me for the majority of the day, any help would be greatly appreciated!
