c# - Autofac : ComponentNotRegisteredException after web site restart -
i have weird error. site works after upload dll bin folder.
however after leave while (or trigger web site restart shared host control panel)
i following error
the requested service 'nop.core.data.datasettings' has not been registered. avoid exception, either register component provide service, check service registration using isregistered(), or use resolveoptional() method resolve optional dependency. [componentnotregisteredexception: requested service 'nop.core.data.datasettings' has not been registered. avoid exception, either register component provide service, check service registration using isregistered(), or use resolveoptional() method resolve 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]
anyone have idea on how on how fix this?
thanks
it sounds need load assemblies using buildmanager.getreferencedassemblies()
ensure loaded after recycle of appdomain.
i have posted details in response similar question in past:
autofac losing registrations on web.config edit
i add notes autofac wiki this.
Comments
Post a Comment