我有一个奇怪的错误。在我将 DLL 上传到 bin 文件夹后,我的网站可以正常工作。
但是在我离开一段时间后(或从我的共享主机控制面板触发网站重新启动)
我收到以下错误
The requested service 'Nop.Core.Data.DataSettings' 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.
[ComponentNotRegisteredException: The requested service 'Nop.Core.Data.DataSettings' 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) +231
Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +118
Autofac.ResolutionExtensions.Resolve(IComponentContext context) +75
Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve(String key) +156
Nop.Core.Infrastructure.NopEngine.Resolve() +110
Nop.Data.EfStartUpTask.Execute() +94
Nop.Core.Infrastructure.NopEngine.RunStartupTasks() +806
Nop.Core.Infrastructure.NopEngine.Initialize(NopConfig config) +90
Nop.Web.MvcApplication.Application_Start() +494[/i]
任何人都知道如何解决这个问题?
谢谢