title: Using Url.RouteUrl() with Route Names in an Area
body: <p>As a side note, I understand the whole <a href="http://haacked.com/archive/2010/01/12/ambiguous-controller-names.aspx">ambiguous controller names</a> problem and have used namespacing to get my routes working, so I don't think that is an issue here.  </p>
  
  <p>So far I have my project level controllers and then a User Area with the following registration: </p>
  
  <pre><code>public class UserAreaRegistration : AreaRegistration
  {
      public override string AreaName
      {
          get
          {
              return "User";
          }
      }
  
      public override void RegisterArea(AreaRegistrationContext context)
      {
          context.MapRoute(
              "UserHome",
              "User/{id}",
              new { action = "Index", controller = "Home", id = 0 },
              new { controller = @"Home", id = @"\d+" }
          );
  
          context.MapRoute(
              "UserDefault",
              "User/{controller}/{action}/{id}",
              new { action = "Index", id = UrlParameter.Optional }
          );
      }
  }
  </code></pre>
  
  <p>The "UserHome" route is there so I can allow the route <code>/User/5</code> vs. <code>/User/Home/Index/5</code> which looks cleaner IMO.  </p>
  
  <p>Ideally I would like to use <code>Url.RouteUrl("UserHome", new { id = 5 })</code>, to generate the route elsewhere, but this always either comes back blank or gives me an exception saying it cannot find the route name, which is obviously there.  </p>
  
  <p>However when I use <code>Url.RouteUrl("UserHome", new { controller = "Home", action = "Index", id = 5 })</code> it works no problem.</p>
  
  <p>Why do I have to specify the action and controller when they have defaults already in the route mapping?  What am I missing?</p>