Html.Action with qualified controller name broken #291

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Reported on

When attempting to render a child action via Html.Action, if you use a fully-qualified controller name (like “~SubArea.Child” where “SubArea” is a namespace under the base controllers namespace, and “Child” represents a controller in that namespace) the call throws an exception that a controller could not be found. I believe this is because ASP.NET MVC’s controller factory attempts to get the controller by name only (ignoring routes), and it does not understand the syntax used by MvcCodeRouting.

I have attached a sample project that shows the error. The default page attempts to render a child action from another controller, but an exception is thrown.

Commented on link

Fixed.