Reputation: 29474
I am creating an Area using ASP.NET MVC 3, by right clicking the project to add an Area called MyArea
.
Visual Studio 2010 automatically created the AreaRegistration and add RegisterAllAreas() to Application_Start() in Global.asax
But this URL doesn't work: http://localhost:1733/MyArea/AreaHome/Index
Even though the route seems to be registered.
Could anyone see what I am doing wrong?
Thanks in advance.
Upvotes: 5
Views: 3060
Reputation: 18125
One of the big things that trips me up when creating new areas is that the template does not automatically reference the new Controller namespaces. You can see what I mean in this similar post:
Cannot load view in area in asp.net mvc 3 using vb.net
It may be in VB.net, but the same solution can be applied.
Upvotes: 4