asp.net mvc - Controllers in seperate assembly and getting a 'The controller for path "/controllerName/" was not found or does not implement IController.' error -
i doing work on project , trying development environment working. project written in asp.net mvc 2. have asp.net mvc 3 installed. controllers have been moved seperate project namespaced projectname.web.controllers. of controllers inherit system.web.mvc.controller. when try hit controller following:
[httpexception]: controller path '/controllername'; not found or not implement icontroller.
if make controllers folder in web project contains views, copy controllers there , recompile, works fine.
you need add new project namespace defaultnamespaces collection on current controllerbuilder
controllerbuilder.current.defaultnamespaces.add("projectname.web.controllers");
Comments
Post a Comment