Error about Nop.Core.Domain.StoreInformationSettings

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi guys,

I'm writing a widget for NopCommerce 2.1. However I keep getting this error after install the widget.


The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

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.Registration.ComponentNotRegisteredException: The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

Source Error:


Line 73:             //ViewEngines.Engines.Add(new ThemableRazorViewEngine());
Line 74:             AreaRegistration.RegisterAllAreas();
Line 75:             if (DataSettingsHelper.DatabaseIsInstalled() &&
Line 76:                 EngineContext.Current.Resolve<StoreInformationSettings>().DisplayMiniProfilerInPublicStore)
Line 77:             {

Source File: C:\Users\Tri\Documents\Koneka\Koneka\NopCommerce\Main\Presentation\Nop.Web\Global.asax.cs    Line: 75

Stack Trace:


[ComponentNotRegisteredException: The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +274
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters) +64
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +109
   Autofac.ResolutionExtensions.Resolve(IComponentContext context) +85
   Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve(String key) +157
   Nop.Core.Infrastructure.NopEngine.Resolve() +128
   Nop.Web.MvcApplication.Application_Start() in C:\Users\Tri\Documents\Koneka\Koneka\NopCommerce\Main\Presentation\Nop.Web\Global.asax.cs:75

[HttpException (0x80004005): The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9160125
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079228
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256


Please help

Thanks
12 years ago
triho wrote:
Hi guys,

I'm writing a widget for NopCommerce 2.1. However I keep getting this error after install the widget.


The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

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.Registration.ComponentNotRegisteredException: The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

Source Error:


Line 73:             //ViewEngines.Engines.Add(new ThemableRazorViewEngine());
Line 74:             AreaRegistration.RegisterAllAreas();
Line 75:             if (DataSettingsHelper.DatabaseIsInstalled() &&
Line 76:                 EngineContext.Current.Resolve<StoreInformationSettings>().DisplayMiniProfilerInPublicStore)
Line 77:             {

Source File: C:\Users\Tri\Documents\Koneka\Koneka\NopCommerce\Main\Presentation\Nop.Web\Global.asax.cs    Line: 75

Stack Trace:


[ComponentNotRegisteredException: The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +274
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters) +64
   Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +109
   Autofac.ResolutionExtensions.Resolve(IComponentContext context) +85
   Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve(String key) +157
   Nop.Core.Infrastructure.NopEngine.Resolve() +128
   Nop.Web.MvcApplication.Application_Start() in C:\Users\Tri\Documents\Koneka\Koneka\NopCommerce\Main\Presentation\Nop.Web\Global.asax.cs:75

[HttpException (0x80004005): The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9160125
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): The requested service 'Nop.Core.Domain.StoreInformationSettings' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079228
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256


Please help

Thanks



triho,

You will need to make sure all referenced assembles have the property "Copy Local" set to false.

https://www.nopcommerce.com/boards/t/11574/the-requested-service-nopdataiefdataprovider-has-not-been-registered.aspx
12 years ago
skyler.severns wrote:


triho,

You will need to make sure all referenced assembles have the property "Copy Local" set to false.

https://www.nopcommerce.com/boards/t/11574/the-requested-service-nopdataiefdataprovider-has-not-been-registered.aspx


Thanks for your quick reply. I already did that. It does not help. It still gives me error. However, when I switch to use IIS server then switch back to Visual Studio 2010 Server. The problem goes away. It comes back when I try to debug the system.

Any ideas?
12 years ago
Hi, did you manage to resolve this?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.