title: asp.net-mvc routing issue : parameters dictionary contains a null entry for parameter
body: <p>I am trying to set up custom routing with the following mapped route</p>
  
  <p>edit: my full route config</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
          routes.MapRoute(
              name: "Default",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
          );
  
          #region FixtureAdmin
  
          routes.MapRoute(
              name: "FixtureEdit",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "FixtureAdmin", action = "Edit", id = UrlParameter.Optional }
          );
  
          #endregion
  
          #region Results
  
          routes.MapRoute(
              name: "ResultAdd",
              url: "{controller}/{action}/{fixtureId}",
              defaults: new { controller = "Result", action = "Add", fixtureId = UrlParameter.Optional }
          );
  
          #endregion
  </code></pre>
  
  <p>And my controller code</p>
  
  <pre><code>public ActionResult Add(int fixtureId)
      {
         // return model to view etc..
      }
  </code></pre>
  
  <p>This is coming up with the exception, even though I have specified the parameter as optional.</p>
  
  <blockquote>
    <p>The parameters dictionary contains a null entry for parameter 'fixtureId' </p>
  </blockquote>
  
  <p>The strange thing is, if I change the parameter of the Add action to just 'Id' then the following URL will work Result/Add/1.  I'm confused, is there some default routing that is overriding my custom one? Why would changing the parameter to just 'Id' work?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Just to test, I added another parameter to the action</p>
  
  <pre><code>public ActionResult Add(int? fixtureId, int? testId)
  </code></pre>
  
  <p>I then edited the route accordingly and now it works, so I reckon it is an issue with default routing.</p>