{"action":"opened","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5368","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5368/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5368/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5368/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/5368","id":86358044,"number":5368,"title":"A delegate registered to create instances of 'System.Web.HttpContextBase' returned null.","user":{"login":"shaunluttin","id":2066637,"avatar_url":"https://avatars.githubusercontent.com/u/2066637?v=3","gravatar_id":"","url":"https://api.github.com/users/shaunluttin","html_url":"https://github.com/shaunluttin","followers_url":"https://api.github.com/users/shaunluttin/followers","following_url":"https://api.github.com/users/shaunluttin/following{/other_user}","gists_url":"https://api.github.com/users/shaunluttin/gists{/gist_id}","starred_url":"https://api.github.com/users/shaunluttin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaunluttin/subscriptions","organizations_url":"https://api.github.com/users/shaunluttin/orgs","repos_url":"https://api.github.com/users/shaunluttin/repos","events_url":"https://api.github.com/users/shaunluttin/events{/privacy}","received_events_url":"https://api.github.com/users/shaunluttin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T22:38:13Z","updated_at":"2015-06-08T22:38:13Z","closed_at":null,"body":"I'm receiving this error when running `help commands`. It's a pull from OrchardCMS 1.9.x that successfully builds in Visual Studio 2015 on Windows 8.1. Here is the full error message:\r\n\r\n```\r\norchard> help commands\r\n\r\nError executing command \"help commands\"\r\n--------------------------------------------------------------------------------\r\n\r\nA delegate registered to create instances of 'System.Web.HttpContextBase' returned null.\r\n\r\nException Details: Autofac.Core.DependencyResolutionException: A delegate registered to create instances of 'System.Web.\r\nHttpContextBase' returned null.\r\n\r\nStack Trace:\r\n\r\n[DependencyResolutionException: A delegate registered to create instances of 'System.Web.HttpContextBase' returned null.\r\n]\r\n   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 param\r\neters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()\r\n   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 p\r\narameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Autofac.Features.Collections.CollectionRegistrationSource.<>c__DisplayClass4.<RegistrationsFor>b__0(IComponentCont\r\next c, IEnumerable`1 p)\r\n   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 param\r\neters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 param\r\neters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()\r\n   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 p\r\narameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Autofac.Features.Collections.CollectionRegistrationSource.<>c__DisplayClass4.<RegistrationsFor>b__0(IComponentCont\r\next c, IEnumerable`1 p)\r\n   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 param\r\neters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 param\r\neters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponen\r\ntRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass5`1.<>c__DisplayClass7.<CreateLazyRegist\r\nration>b__4()\r\n   at System.Lazy`1.CreateValue()\r\n   at System.Lazy`1.LazyInitValue()\r\n   at Orchard.ContentManagement.DefaultContentManager.get_Handlers() in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-mo\r\ndules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentManager.cs:line 81\r\n   at Orchard.ContentManagement.DefaultContentManager.New(String contentType) in C:\\Users\\BigFont\\Documents\\GitHub\\orcha\r\nrd-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentManager.cs:line 102\r\n   at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in C:\\User\r\ns\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentManager.cs:line 22\r\n7\r\n   at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in C:\\Users\\BigFont\\Document\r\ns\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentManager.cs:line 131\r\n   at Orchard.ContentManagement.DefaultContentQuery.<Slice>b__26_0(ContentItemVersionRecord x) in C:\\Users\\BigFont\\Docum\r\nents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentQuery.cs:line 193\r\n   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at Orchard.Utility.Extensions.ReadOnlyCollectionExtensions.ToReadOnlyCollection[T](IEnumerable`1 enumerable) in C:\\Us\r\ners\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Utility\\Extensions\\ReadOnlyCollectionExtensions.\r\ncs:line 8\r\n   at Orchard.ContentManagement.DefaultContentQuery.Slice(Int32 skip, Int32 count) in C:\\Users\\BigFont\\Documents\\GitHub\\\r\norchard-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentQuery.cs:line 191\r\n   at Orchard.ContentManagement.DefaultContentQuery.ContentQuery`1.Orchard.ContentManagement.IContentQuery<T>.List() in\r\nC:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\ContentManagement\\DefaultContentQuery.cs:li\r\nne 292\r\n   at Orchard.Core.Settings.Services.SiteService.<GetSiteSettings>b__7_0(AcquireContext`1 ctx) in C:\\Users\\BigFont\\Docum\r\nents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard.Web\\Core\\Settings\\Services\\SiteService.cs:line 28\r\n   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modul\r\nes-and-themes\\src\\Orchard\\Caching\\Cache.cs:line 57\r\n   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-\r\nand-themes\\src\\Orchard\\Caching\\Cache.cs:line 27\r\n   at Orchard.Caching.Cache`2.<>c__DisplayClass3_0.<Get>b__0(TKey k) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-mo\r\ndules-and-themes\\src\\Orchard\\Caching\\Cache.cs:line 19\r\n   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateVa\r\nlueFactory)\r\n   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and\r\n-themes\\src\\Orchard\\Caching\\Cache.cs:line 17\r\n   at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in C:\\Users\\BigFont\\Documents\\GitH\r\nub\\orchard-cms-modules-and-themes\\src\\Orchard\\Caching\\DefaultCacheManager.cs:line 33\r\n   at Orchard.Core.Settings.Services.SiteService.GetSiteSettings() in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modu\r\nles-and-themes\\src\\Orchard.Web\\Core\\Settings\\Services\\SiteService.cs:line 27\r\n   at Orchard.Settings.CurrentSiteWorkContext.Get[T](String name) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modul\r\nes-and-themes\\src\\Orchard\\Settings\\CurrentSiteWorkContext.cs:line 13\r\n   at Orchard.Environment.WorkContextImplementation.<>c__DisplayClass7_0`1.<FindResolverForState>b__0(IWorkContextStateP\r\nrovider wcsp) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImp\r\nlementation.cs:line 32\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at Orchard.Environment.WorkContextImplementation.FindResolverForState[T](String name) in C:\\Users\\BigFont\\Documents\\G\r\nitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImplementation.cs:line 32\r\n   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n   at Orchard.Environment.WorkContextImplementation.GetState[T](String name) in C:\\Users\\BigFont\\Documents\\GitHub\\orchar\r\nd-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImplementation.cs:line 27\r\n   at Orchard.WorkContext.get_CurrentSite() in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orch\r\nard\\WorkContext.cs:line 50\r\n   at Orchard.Localization.Services.SiteCultureSelector.GetCulture(HttpContextBase context) in C:\\Users\\BigFont\\Document\r\ns\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Localization\\Services\\SiteCultureSelector.cs:line 13\r\n   at Orchard.Localization.Services.CurrentCultureWorkContext.<>c__DisplayClass4_0.<GetCurrentCulture>b__0(ICultureSelec\r\ntor c) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Localization\\Services\\CurrentCult\r\nureWorkContext.cs:line 29\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()\r\n   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at Orchard.Localization.Services.CurrentCultureWorkContext.GetCurrentCulture() in C:\\Users\\BigFont\\Documents\\GitHub\\o\r\nrchard-cms-modules-and-themes\\src\\Orchard\\Localization\\Services\\CurrentCultureWorkContext.cs:line 28\r\n   at Orchard.Localization.Services.CurrentCultureWorkContext.Get[T](String name) in C:\\Users\\BigFont\\Documents\\GitHub\\o\r\nrchard-cms-modules-and-themes\\src\\Orchard\\Localization\\Services\\CurrentCultureWorkContext.cs:line 19\r\n   at Orchard.Environment.WorkContextImplementation.<>c__DisplayClass7_0`1.<FindResolverForState>b__0(IWorkContextStateP\r\nrovider wcsp) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImp\r\nlementation.cs:line 32\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at Orchard.Environment.WorkContextImplementation.FindResolverForState[T](String name) in C:\\Users\\BigFont\\Documents\\G\r\nitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImplementation.cs:line 32\r\n   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n   at Orchard.Environment.WorkContextImplementation.GetState[T](String name) in C:\\Users\\BigFont\\Documents\\GitHub\\orchar\r\nd-cms-modules-and-themes\\src\\Orchard\\Environment\\WorkContextImplementation.cs:line 27\r\n   at Orchard.WorkContext.get_CurrentCulture() in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\O\r\nrchard\\WorkContext.cs:line 74\r\n   at Orchard.Localization.Text.Get(String textHint, Object[] args) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-mod\r\nules-and-themes\\src\\Orchard\\Localization\\Text.cs:line 27\r\n   at Orchard.Commands.DefaultOrchardCommandHandler.Invoke(CommandContext context) in C:\\Users\\BigFont\\Documents\\GitHub\\\r\norchard-cms-modules-and-themes\\src\\Orchard\\Commands\\DefaultOrchardCommandHandler.cs:line 59\r\n   at Orchard.Commands.DefaultOrchardCommandHandler.Execute(CommandContext context) in C:\\Users\\BigFont\\Documents\\GitHub\r\n\\orchard-cms-modules-and-themes\\src\\Orchard\\Commands\\DefaultOrchardCommandHandler.cs:line 18\r\n   at Orchard.Commands.DefaultCommandManager.Execute(CommandParameters parameters) in C:\\Users\\BigFont\\Documents\\GitHub\\\r\norchard-cms-modules-and-themes\\src\\Orchard\\Commands\\DefaultCommandManager.cs:line 27\r\n   at Orchard.Commands.CommandHostAgent.RunCommand(TextReader input, TextWriter output, String tenant, String[] args, Di\r\nctionary`2 switches) in C:\\Users\\BigFont\\Documents\\GitHub\\orchard-cms-modules-and-themes\\src\\Orchard\\Commands\\CommandHos\r\ntAgent.cs:line 86\r\n\r\n--------------------------------------------------------------------------------\r\n```\r\n\r\n"}}