Aximili
Aximili

Reputation: 29474

ASP.NET MVC 3 - Area not working

I am creating an Area using ASP.NET MVC 3, by right clicking the project to add an Area called MyArea.

Project screenshot

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

Error message

Even though the route seems to be registered.

RouteDebugger

Could anyone see what I am doing wrong?

Thanks in advance.

Upvotes: 5

Views: 3060

Answers (1)

cwharris
cwharris

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

Related Questions