Ninject MVC Controller from external assembly
I have some controllers in an external assembly, such as:
namespace SomeExternalAssembly.Controllers
{
public class SomeExternalController : Controller
{
public ActionResult DoStuff() {...}
}
}
then within my main mvc assembly I do the following:
routes.MapRoute(
"SomeExternalController",
"external/{开发者_如何学运维action}",
new { controller = "SomeExternal", action = "Default"}
);
Now the problem I am having is that I currently get an 404 when trying to hit that route, even though the route debugged shows it matching that route. I am only assuming that it is defaulting to the built in MVC controller factory to handle the type not being found. Is there any way around this... as currently most of my routes and controllers are injected by MEF at runtime...
精彩评论