title: Getting error 404 not found with ASP.NET MVC Area routing
body: <p>I am having a problem with an Area route in MVC 5.  When I browse to /Evernote/EvernoteAuth I get a 404 resource cannot be found error.</p>
  
  <p>My area looks like this:</p>
  
  <pre><code>Areas
      Evernote
          Controllers
              EvernoteAuthController
          Views
              EvernoteAuth
                  Index.cshtml
  </code></pre>
  
  <p>The EvernoteAreaRegistration.cs (UPDATE: RegisterArea() wasn't being called so I did a Clean and Rebuild.  Now it is called but same result.) contains this route map:</p>
  
  <pre><code>public override void RegisterArea(AreaRegistrationContext context)
  {
       context.MapRoute(
          "Evernote_default",
          "Evernote/{controller}/{action}/{id}",
          new { action = "Index", id = UrlParameter.Optional }
       );
  }
  </code></pre>
  
  <p>The EvernoteAuthController's Index() method simply returns View().</p>
  
  <p>My application's RouteConfig.cs currently has no route maps defined, but I tried manually "forcing" it here by implementing this:</p>
  
  <pre><code>routes.MapRoute(
      name: "EvernoteAuthorization",
      url: "Evernote/{controller}/{action}",
      defaults: new { controller = "EvernoteAuth", action = "Index", id = UrlParameter.Optional },
      namespaces: new string[] { "AysncOAuth.Evernote.Simple.SampleMVC.Controllers" }
  );
  </code></pre>
  
  <p>but I get the same results whether this route map exists or is commented out.</p>
  
  <p>Using Phil Haack's <a href="http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx/">asp.net mvc routing debugger</a> I saw that my routes matched fine and the area name, controller name and Action method names matched.  I put breakpoints in the controller action methods and those methods were never entered.  UPDATE: Those methods were never entered when browsing to /Evernote/EvernoteAuth however when I browsed to just the area name, /Evernote, an EvernoteAuthController was instantiated and the Index() method was called.  (Why is that controller being instantiated by /Evernote by not by /Evernote/EvernoteAuth?)  Then I received the error:</p>
  
  <pre><code>The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
  ~/Views/EvernoteAuth/Index.aspx
  ~/Views/EvernoteAuth/Index.ascx
  ~/Views/Shared/Index.aspx
  ~/Views/Shared/Index.ascx
  ~/Views/EvernoteAuth/Index.cshtml
  ~/Views/Shared/Index.cshtml
  and so on...
  </code></pre>
  
  <p>In this case I believe ~ = / (application root).  So the area <code>Areas\Evernote\Views</code> is not being searched.</p>
  
  <p>How do I troubleshoot this?</p>