Creating Site in Orchard 1.6 failing in production: Orchard.Tasks.BackgroundService - Error while processing background task

Topics: General, Installing Orchard, Troubleshooting
Nov 5, 2012 at 10:53 AM

Hi all,

I'm trying to create a a new site in Orchard 1.6, and it's working fine in my local machine. As soon as I try to create the site in the hosting enviroment (empty database, App_Data folder empty), I'm getting the issue I'm not able to even to enter the sitename. Can someone help me out here as my Site is down since yesterday?

2012-11-04 16:30:04,678 [29] Orchard.Tasks.BackgroundService - Error while processing background task
Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Data.IRepository`1[Orchard.Warmup.Models.WarmupSettingsPartRecord])' on type 'WarmupSettingsPartHandler'. ---> System.Security.VerificationException: Operation could destabilize the runtime.
   at Orchard.ContentManagement.Handlers.ActivatingFilter`1..ctor(String[] contentTypes)
   at Orchard.Warmup.Handlers.WarmupSettingsPartHandler..ctor(IRepository`1 repository)
   --- End of inner exception stack trace ---
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.<Execute>b__6()
   at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Features.Collections.CollectionRegistrationSource.<>c__DisplayClass4.<>c__DisplayClass6.<RegistrationsFor>b__1(IComponentRegistration cr)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Autofac.Features.Collections.CollectionRegistrationSource.<>c__DisplayClass4.<RegistrationsFor>b__0(IComponentContext c, IEnumerable`1 p)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Registration.ExternalRegistrySource.<>c__DisplayClass8.<RegistrationsFor>b__3(IComponentContext c, IEnumerable`1 p)
   at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass5`1.<>c__DisplayClass7.<CreateLazyRegistration>b__4()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Orchard.ContentManagement.DefaultContentManager.New(String contentType) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 76
   at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 199
   at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 111
   at Orchard.ContentManagement.DefaultContentQuery.<Slice>b__0(ContentItemVersionRecord x) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 148
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.ContentManagement.DefaultContentQuery.Slice(Int32 skip, Int32 count) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 146
   at Orchard.ContentManagement.DefaultContentQuery.ContentQuery`1.Orchard.ContentManagement.IContentQuery<T>.Slice(Int32 skip, Int32 count) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 195
   at Orchard.Core.Settings.Services.SiteService.<GetSiteSettings>b__0(AcquireContext`1 ctx) in c:\Build\Orchard\src\Orchard.Web\Core\Settings\Services\SiteService.cs:line 30
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 57
   at Orchard.Caching.Cache`2.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 19
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\Cache.cs:line 17
   at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in c:\Build\Orchard\src\Orchard\Caching\DefaultCacheManager.cs:line 33
   at Orchard.Core.Settings.Services.SiteService.GetSiteSettings() in c:\Build\Orchard\src\Orchard.Web\Core\Settings\Services\SiteService.cs:line 29
   at Orchard.Settings.CurrentSiteWorkContext.Get[T](String name) in c:\Build\Orchard\src\Orchard\Settings\CurrentSiteWorkContext.cs:line 13
   at Orchard.Environment.WorkContextImplementation.<>c__DisplayClass7`1.<FindResolverForState>b__2(IWorkContextStateProvider wcsp) in c:\Build\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:line 32
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Orchard.Environment.WorkContextImplementation.FindResolverForState[T](String name) in c:\Build\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:line 32
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Orchard.Environment.WorkContextImplementation.GetState[T](String name) in c:\Build\Orchard\src\Orchard\Environment\WorkContextImplementation.cs:line 27
   at Orchard.WorkContext.get_CurrentSite() in c:\Build\Orchard\src\Orchard\WorkContext.cs:line 52
   at Orchard.Warmup.Services.WarmupTask.Sweep()
   at Orchard.Tasks.BackgroundService.Sweep() in c:\Build\Orchard\src\Orchard\Tasks\BackgroundService.cs:line 31

Coordinator
Nov 6, 2012 at 1:48 AM

please provide some details about the environment. Did previous versions work in the same environment?