ASP.NET MVC "The parameters dictionary contains a null entry for parameter”

· March 12, 2009

This (The parameters dictionary contains a null entry for parameter) exception was thrown at me and confused me for a while.

If you ever encounter it I can almost guarantee that you have a Routing-issue.  That is the way the ASP.NET MVC framework is figuring out which controller and which method to invoke.

In my case I had a controller action method that required two parameter but my routing table only allowed for one.

Here is a description on how to add your own, custom route rules.

And also here is a great tool to understand and debug your routing-table entries.

Finally – this webcast contains a discussion about how to change routes.

Twitter, Facebook