Orchardcore: Unable to resolve service for type 'YesSql.ISession' while attempting to activate 'OrchardCore.Workflows.Http.Services.HttpRequestRouteActivator'

Created on 24 Jan 2020  路  3Comments  路  Source: OrchardCMS/OrchardCore

I am getting following error on OrchardCore CMS startup. Any ideas on how to fix it?

fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLT0MKP5R3CA", Request id "0HLT0MKP5R3CA:00000001": An unhandled exception was thrown by the application.
System.InvalidOperationException: Unable to resolve service for type 'YesSql.ISession' while attempting to activate 'OrchardCore.Workflows.Http.Services.HttpRequestRouteActivator'.
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(Type serviceType, Type implementationType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateEnumerable(Type serviceType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 73
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Most helpful comment

If you accidentally type AddOrchardCore() in the 'ConfigureServices' in Startup.cs instead of type AddOrchardCms() ,then you get this error

All 3 comments

How can we repro this issue?

If you accidentally type AddOrchardCore() in the 'ConfigureServices' in Startup.cs instead of type AddOrchardCms() ,then you get this error

Sorry for the long delay, but yeah, as @eybye mentioned it was typo in Startup

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebastienros picture sebastienros  路  4Comments

chillibug picture chillibug  路  4Comments

szilardcsere89 picture szilardcsere89  路  3Comments

randaratceridian picture randaratceridian  路  3Comments

ns8482e picture ns8482e  路  4Comments