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