title: ASP.NET MVC routing - trying to have a name in the URL
body: <p>I have currently the following routes:</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  routes.IgnoreRoute("{resource}.gif/{*pathInfo}");
  
  MvcRoute.MappUrl("{controller}/{action}/{ID}")
      .WithDefaults(new { controller = "home", action = "index", ID = 0 })
      .WithConstraints(new { controller = "..." })
      .AddWithName("default", routes)
      .RouteHandler = new MvcRouteHandler();
  
  MvcRoute.MappUrl("{title}/{ID}")
      .WithDefaults(new { controller = "special", action = "Index" })
      .AddWithName("view", routes)
      .RouteHandler = new MvcRouteHandler();
  </code></pre>
  
  <p>The SpecialController has a method: <code>public ActionResult Index(int ID)</code></p>
  
  <p>Whenever I point my browser to <code>http://hostname/test/5</code>, I get the following error:</p>
  
  <blockquote>
    <p>The parameters dictionary contains a null entry for parameter 'ID' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Index(Int32)' in 'SpecialController'. To make a parameter optional its type should be either a reference type or a Nullable type. <br/>
    Parameter name: parameters <br/>
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
  </blockquote>
  
  <p>Why is that? I used the mvccontrib route debugger, and it seems that the route is accessible as expected.</p>