I'm getting the following exception when sending a post request to my console API:
Autofac.Core.DependencyResolutionException
HResult=0x80131500
Message=An exception was thrown while activating TeocoExcel.DataManager.
Source=Autofac
StackTrace:
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Container.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 TeocoExcel.Program.Main(String[] args) in C:\Users\mcellery.badio\source\repos\ConsoleApplications\TeocoExcel\TeocoExcel\Program.cs:line 10
Inner Exception 1:
DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Interfaces.ILoadDataService, Interfaces.IProcessBatchService, Interfaces.IXmlManager, Interfaces.IEmailService)' on type 'DataManager'.
Inner Exception 2:
TypeInitializationException: The type initializer for 'TeocoExcel.DataManager' threw an exception.
Inner Exception 3:
COMException: Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
The Microsoft.Office.Interop.Excel [CSLID: {00020813-0000-0000-C000-000000000046}] was not registered by Autofac.
User contributions licensed under CC BY-SA 3.0