title: Set a route to an area without specifying the area name in the url in MVC
body: <p>I have an <code>MVC 4</code> application. In that application I have certain Areas, whose URL is not resolved properly. The <code>LocationAreaRegistration.cs</code> is as follows:</p>
  
  <pre><code>context.MapRoute(
              "Location_default",
              "{culture}/{controller}/{action}/{id}",
              new { culture = "en", action = "LocationIndex", id = UrlParameter.Optional },
              new { controller = "(LocationIndex)" }
          );
  </code></pre>
  
  <p>My <code>route.config</code> is as follows:</p>
  
  <pre><code>routes.MapRoute(
                   name: "Default",
                   url: "{culture}/{controller}/{action}/{id}",
                   defaults: new { culture = "en", controller = "Home", action = "Index", id = UrlParameter.Optional },
                   namespaces: new[] { "Locator.Areas.Location.Controllers" }
                 ).DataTokens.Add("area", "Location");
  </code></pre>
  
  <p>I have also tried to change the <code>route.config</code> as below:</p>
  
  <pre><code>routes.MapRoute(
               name: "Default",
               url: "{culture}/{controller}/{action}/{id}",
               defaults: new { culture = "en", controller = "Home", action = "Index", id = UrlParameter.Optional },
               namespaces: new[] { "Locator.Areas.Location.Controllers" }
             );
  </code></pre>
  
  <p>None of the approaches worked and I get <code>The resource cannot be found</code> error.</p>
  
  <p>However when I change the <code>LocationAreaRegistration.cs</code> as follows, it works:</p>
  
  <pre><code>context.MapRoute(
              "Location_default",
              "{culture}/Location/{controller}/{action}/{id}",
              new { culture = "en", action = "LocationIndex", id = UrlParameter.Optional },
              new { controller = "(LocationIndex)" }
          );
  </code></pre>
  
  <p>But I do not want the URL to contain the <code>Location</code>(Area name). What am I doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The URLs that I would be going to will be somewhat like:</p>
  
  <pre><code>http://localhost/en/LocationIndex/LocationIndex
  </code></pre>
  
  <p>Here <code>en</code> is the current culture, <code>Home</code> is the <code>controller</code> name and <code>Index</code> is the <code>action method</code> name.</p>