title: ASP.NET MVC 2 Areas 404
body: <p>Has anyone been able to get the Areas in ASP.NET MVC 2 to work? </p>
  
  <p>I created a new Area called "Secure" and placed a new controller in it named HomeController. I then Created a new Home/Index.aspx view. However, when I browse to <a href="http://localhost/myapp/Secure/" rel="nofollow noreferrer">http://localhost/myapp/Secure/</a> it gives a 404 resource cannot be found. <a href="http://localhost/myapp/Secure/Home" rel="nofollow noreferrer">http://localhost/myapp/Secure/Home</a> gives the same error.</p>
  
  <p>My area registration looks like this:</p>
  
  <pre><code>public override void RegisterArea(AreaRegistrationContext context)
          {
              context.MapRoute(
                  "Secure_default",
                  "Secure/{controller}/{action}/{id}",
                  new { action = "Index", id = UrlParameter.Optional }
              );
          }
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>public override void RegisterArea(AreaRegistrationContext context)
          {
              context.MapRoute(
                  "Secure_default",
                  "Secure/{controller}/{action}/{id}",
                  new { controller = "Home", action = "Index", id = UrlParameter.Optional }
              );
          }
  </code></pre>
  
  <p>Thanks,
  Justin</p>