Unable to setup under IIS

Topics: Installing Orchard
Jul 6, 2012 at 10:57 AM
Edited Jul 6, 2012 at 10:58 AM

Hello All,

setup crashes with the following error:

Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.

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: System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.

Source Error: 


Line 50:             ShapeDescriptor descriptor) {
Line 51:             return context => {
Line 52:                 var serviceInstance = _componentContext.ResolveComponent(attributeOccurrence.Registration, Enumerable.Empty());
Line 53: 
Line 54:                 // oversimplification for the sake of evolving

Source File: D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs    Line: 52 

Stack Trace: 


[ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.]
   Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +407
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass4.b__3(DisplayContext context) in D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:52
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.b__2(DisplayContext displayContext) in D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:38
   Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func`1 proceed, Object target, String name, INamedEnumerable`1 args) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelperFactory.cs:27
   ClaySharp.<>c__DisplayClass16.b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   ASP._Page_Themes_SafeMode_Views_Layout_cshtml.Execute() in d:\Local\Orchard\src\Orchard.Web\Themes\SafeMode\Views\Layout.cshtml:25
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +158
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:134
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.b__15(DisplayContext displayContext) in D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:118
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.b__2(DisplayContext displayContext) in D:\Local\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:38
   Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func`1 proceed, Object target, String name, INamedEnumerable`1 args) in D:\Local\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelperFactory.cs:27
   ClaySharp.<>c__DisplayClass16.b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in D:\Local\Orchard\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:63
   Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutView.Render(ViewContext viewContext, TextWriter writer) in D:\Local\Orchard\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:90
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +384
   System.Web.Mvc.<>c__DisplayClass1c.b__19() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +825460
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +825488
   System.Web.Mvc.Controller.ExecuteCore() +159
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
   System.Web.Mvc.<>c__DisplayClassb.b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +20
   System.Web.Mvc.<>c__DisplayClasse.b__d() +54
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in D:\Local\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:147
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

Initially I enlisted the sources (default). Then launched the Orchard.sln and hit Ctrl+F5. In this case all worked fine and setup has been executed successfully.

However when I change web server to local IIS, mentioned above errors constantly occurs.

What am I doing wrong?

Jul 6, 2012 at 2:40 PM

Issue has been resolved.

To resolve this issue several additional components should be installed from Windows Features:

  1. Internet Information Services -> World Wide Web Services -> Application Development Features:
    .NET Extensibility, ASP .NET, ISAPI Extensions, ISAPI Filters
  2. Internet Information Services Hostable Web Core