Orchard FAIL out of the box -- Who can work with buggy code like this?

Topics: General, Troubleshooting
Aug 25, 2015 at 1:06 AM
Installed Orchard. As soon as I tried to go to the default web site (before I had a chance to do anything), it fails with the below. How can any of you work with something this fragile?

Server Error in '/' Application.

None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator, System.Collections.Generic.IEnumerable1[Orchard.Owin.IOwinMiddlewareProvider], Orchard.Environment.Configuration.ShellSettings)'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator, System.Collections.Generic.IEnumerable1[Orchard.Owin.IOwinMiddlewareProvider], Orchard.Environment.Configuration.ShellSettings)'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator, System.Collections.Generic.IEnumerable1[Orchard.Owin.IOwinMiddlewareProvider], Orchard.Environment.Configuration.ShellSettings)'.]
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) +440
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable
1 parameters) +48
Autofac.Core.Resolving.InstanceLookup.<Execute>b__0() +7
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator) +120
Autofac.Core.Resolving.InstanceLookup.Execute() +132
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable
1 parameters) +133
Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters) +24
Autofac.Core.Registration.<>c__DisplayClass8.<RegistrationsFor>b__3(IComponentContext c, IEnumerable
1 p) +19
Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) +32
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable
1 parameters) +48
Autofac.Core.Resolving.InstanceLookup.Execute() +48
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) +133
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable
1 parameters) +64
Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable1 parameters) +109
Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance) +74
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) +54
Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable
1 parameters) +118
Orchard.Environment.ShellBuilders.ShellContextFactory.CreateSetupContext(ShellSettings settings) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:113
Orchard.Environment.DefaultOrchardHost.CreateSetupContext() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\DefaultOrchardHost.cs:179
Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\DefaultOrchardHost.cs:138
Orchard.Environment.DefaultOrchardHost.BuildCurrent() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\DefaultOrchardHost.cs:109
Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\DefaultOrchardHost.cs:71
Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard.Web\Global.asax.cs:48
Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard.WarmupStarter\Starter.cs:89

[ApplicationException: Error during application initialization]
Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard.WarmupStarter\Starter.cs:63
Orchard.Web.MvcApplication.Application_BeginRequest() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard.Web\Global.asax.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +56
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Developer
Aug 25, 2015 at 8:37 AM
Which Orchard version and what package are you using? In case of using the full source edition, which version of Visual Studio are you using?
Aug 25, 2015 at 1:37 PM
Downloaded and installed WebMatrix 3. Selected Orchard CMS from the app gallery in WebMatrix. It downloaded and installed. I entered the name of my new site. It created the site and took me back to WebMatrix. It says the site is at localhost:61390. I don't see any way to determine what version of Orchard I am running.
Developer
Aug 25, 2015 at 7:29 PM
I see. I think I've seen this behavior once before, but somehow healed itself when trying to just use IIS. Then tried WebMatrix again, and worked. I'm not saying this is normal of course, but it would be interesting to know if it's the same in your case. What version of Windows are you on?
Aug 25, 2015 at 8:26 PM
Actually, it did heal itself, and seems to be working OK now, at least for the moment. I am evaluating CMS tools for a big project, and , while Orchard seems like a decent tool, this makes me nervous. How stable is the WebMatrix/WebDeploy/Orchard stack?
Developer
Aug 26, 2015 at 11:22 AM
That's good. Maybe some ASP.NET compilation issue of sorts. Orchard is stable , it's in use by many for years, large and small sites and even enterprise scale.
Coordinator
Aug 26, 2015 at 6:33 PM
If you are evaluating it for a big project, I would not suggest to use WebMatrix. You will probably have some custom development to do, which will require Visual Studio.

So try to download Visual Studio if you don't have it yet, and use Orchard's source code as this is the recommended way for developing on Orchard.
Aug 26, 2015 at 7:37 PM

Thanks for the advice. I really appreciate it.


The information contained in (and attached to) this e-mail is intended only for the personal and confidential use of the designated recipient(s) named above and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.