title: How to register areas for routing
body: <p>I created MVC Application that have 3 different Area. (Admin, User, News)
  This is my RouteConfig.cs File in App_Start directory:</p>
  
  <pre><code>public class RouteConfig
  {
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
          routes.MapRoute(
              name: "Default",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
              namespaces: new[] { "TestMvcApplication.Controllers" }
          );
      }
  }
  </code></pre>
  
  <p>And This is my AdminAreaRegisteration.cs file:</p>
  
  <pre><code>    namespace TestMvcApplication.Areas.Admin
  {
      public class AdminAreaRegistration : AreaRegistration
      {
          public override string AreaName
          {
              get
              {
                  return "Admin";
              }
          }
  
          public override void RegisterArea(AreaRegistrationContext context)
          {
              context.MapRoute(
                  "Admin_default",
                  "Admin/{controller}/{action}/{id}",
                  new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                  namespaces: new[] { "TestMvcApplication.Areas.Admin.Controllers" }                
              );
          }
      }
  }
  </code></pre>
  
  <p>And finally this is my Global.asax.cs file content:</p>
  
  <pre><code>namespace TestMvcApplication
  {
      // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
      // visit http://go.microsoft.com/?LinkId=9394801
  
      public class MvcApplication : System.Web.HttpApplication
      {
          protected void Application_Start()
          {
              AreaRegistration.RegisterAllAreas();
  
              WebApiConfig.Register(GlobalConfiguration.Configuration);
              FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
              RouteConfig.RegisterRoutes(RouteTable.Routes);
              BundleConfig.RegisterBundles(BundleTable.Bundles);
              AuthConfig.RegisterAuth();
          }
      }
  }
  </code></pre>
  
  <p>Home page of my website fully loaded and it's works. but Homepage of Admin or other areas are not detect by route and I gave this error message:</p>
  
  <pre><code>Server Error in '/' Application.
  The resource cannot be found.
  Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
  
  Requested URL: /Admin/Home
  </code></pre>
  
  <p>How can I solve this problem?
  Thanks.</p>