Dependency Resolve exception a few hours after starting site

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
After launching our nopCommerce site it works for a few hours, after that (I assume after IIS recycles the application pool and re-compiles?) the site displays an error screen and the following exception is logged:

We've been having some problems related to an EntityFramework DLL targeting .NET 4.0 instead of .NET 4.5 before, is this related maybe?

I already tried referencing the correct assemblies in Visual Studio but that does not seem to work. Reuploading the bin/ directory to the server does fix the issue, but after a few hours the problem comes back in the exact same way...

We're using nopCommerce 3.5.


Exception information:
    Exception type: HttpException
    Exception message: An exception was thrown while executing a resolve operation. See the InnerException for details. ---> Exception has been thrown by the target of an invocation. (See inner exception for details.)
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

An exception was thrown while executing a resolve operation. See the InnerException for details. ---> Exception has been thrown by the target of an invocation. (See inner exception for details.)
   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context)
   at Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve[T](String key, ILifetimeScope scope) in C:\...Libraries\Nop.Core\Infrastructure\DependencyManagement\ContainerManager.cs:line 34
   at Nop.Core.Infrastructure.NopEngine.Resolve[T]() in C:\...Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 109
   at SevenSpikes.Nop.Framework.InstallHelper.InstallLocaleResources(String pluginFolderName, String fileNameWithoutCultureAndExtension, Boolean updateExistingResources)
   at SevenSpikes.Nop.Plugins.Core.RouteProvider.Mf6dtl32695Rn9r0j3(Object , Object , Object , Boolean )
   at SevenSpikes.Nop.Plugins.Core.RouteProvider.InstallMissingResources()
   at SevenSpikes.Nop.Framework.Routing.BaseRouteProvider.Aahkac6uh7HXcyuHKAM(Object )
   at SevenSpikes.Nop.Framework.Routing.BaseRouteProvider.RegisterRoutes(RouteCollection routes)
   at Nop.Web.Framework.Mvc.Routes.RoutePublisher.<>c__DisplayClass3_0.<RegisterRoutes>b__1(IRouteProvider rp) in C:\...Presentation\Nop.Web.Framework\Mvc\Routes\RoutePublisher.cs:line 67
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Nop.Web.Framework.Mvc.Routes.RoutePublisher.RegisterRoutes(RouteCollection routes) in C:\...Presentation\Nop.Web.Framework\Mvc\Routes\RoutePublisher.cs:line 67
   at Nop.Web.MvcApplication.RegisterRoutes(RouteCollection routes) in C:\...Presentation\Nop.Web\Global.asax.cs:line 29
   at Nop.Web.MvcApplication.Application_Start() in C:\...Presentation\Nop.Web\Global.asax.cs:line 61

Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at System.Data.Entity.Utilities.MemberInfoExtensions.GetValue(MemberInfo memberInfo)
   at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(Type providerType)
   at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName)
   at System.Data.Entity.Internal.AppConfig.<.ctor>b__2(ProviderElement e)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at System.Data.Entity.Internal.AppConfig.<.ctor>b__1()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at System.Data.Entity.Internal.AppConfig.get_DbProviderServices()
   at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.RegisterDbProviderServices()
   at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServiceFactory(Type type, String name)
   at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.<>c__DisplayClass1.<GetService>b__0(Tuple`2 t)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetService(Type type, Object key)
   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.GetService(Type type, Object key)
   at System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key)
   at System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService[T](IDbDependencyResolver resolver)
   at System.Data.Entity.DbContext.InitializeLazyInternalContext(IInternalConnection internalConnection, DbCompiledModel model)
   at System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
   at Nop.Web.Framework.DependencyRegistrar.<>c__DisplayClass0_0.<Register>b__8(IComponentContext c) in C:\...\Presentation\Nop.Web.Framework\DependencyRegistrar.cs:line 107
   at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.<Register>b__f(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>b__0()
   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.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass2.<CanSupplyValue>b__0()
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.Instan

7 years ago
gerwin3 wrote:
After launching our nopCommerce site it works for a few hours, after that (I assume after IIS recycles the application pool and re-compiles?) the site displays an error screen and the following exception is logged:

We've been having some problems related to an EntityFramework DLL targeting .NET 4.0 instead of .NET 4.5 before, is this related maybe?

I already tried referencing the correct assemblies in Visual Studio but that does not seem to work. Reuploading the bin/ directory to the server does fix the issue, but after a few hours the problem comes back in the exact same way...

We're using nopCommerce 3.5.


Exception information:
  

........



May be you have used any  third party plugin that contain old reference ..check third party  plugin folder that contain any dll that that already has in the server bin folder
7 years ago
Okay, I did find a plugin that had a copy of nopCommerce's dependencies, I removed those DLL's and the site still works. I'll report back if this fixed the issue for good! Thanks a lot!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.