This project is read-only.

The IControllerFactory 'Orchard.Mvc.OrchardControllerFactory' did not return a controller for the name 'Orchard.ContentTypes'.

Topics: Troubleshooting
May 12, 2011 at 3:14 PM
Edited May 12, 2011 at 3:45 PM

I installed Orchard through Web PI (with Elmah) and I am getting the exception below through Elmah.  I can reproduce by going to:

Admin Dashboard >  Content > Content Types Tab > Edit Page Content Type

 I do not see anything wrong with the site (everything looks correct) so I think this is just a missing file or bad link (??).  There is no admin.js file in the /Modules/Orchard.ContentTypes/scripts/ folder.



System.InvalidOperationException: The IControllerFactory 'Orchard.Mvc.OrchardControllerFactory' did not return a controller for the name 'Orchard.ContentTypes'.

Generated: Thu, 12 May 2011 13:50:34 GMT

System.InvalidOperationException: The IControllerFactory 'Orchard.Mvc.OrchardControllerFactory' did not return a controller 
for the name 'Orchard.ContentTypes'.
   at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<BeginProcessRequest>b__2()
   at System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a()
   at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func`1 func)
   at Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) 
in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\Routes\ShellRoute.cs:line 143
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



May 12, 2011 at 7:11 PM

Can you try again without Elmah?

May 12, 2011 at 7:44 PM

The Elmah error report is the only reason I know of the error.  Removing Elmah will resolve this issue ;).

May 12, 2011 at 7:54 PM

Right, if the issue is that you want the site to work, the solution is to remove Elmah. If the issue is that Elmah is incompatible with Orchard, well yes it is. Orchard uses Log4Net and puts the logs in App_Data\logs.