namespace for the route rule

Dec 14, 2012 at 6:14 AM


is there no way to set controllers namespace for route?

i have two controllers with the same name in the different areas, and I have got exception with the message "Multiple types were found that match the controller named".

Dec 14, 2012 at 5:03 PM

There is now.

I was able to reproduce your issue by including two controllers with the same name in two different namespaces.

To resolve it, I've now (release 1.0.2, rev. 81746) added a <namespaces> element as a possible child element of the Mvc route.

For example:

  <add type="Mvc" name="Default" url="mvc/{controller}/{action}/{id}">
    <defaults controller="Home" action="Index" id="" />
      <add namespace="Sample.Controllers"/>