Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Ujinjinjin opened this issue Jan 24, 2020 · 3 comments
Milestone

Comments

@Ujinjinjin
Copy link

Ujinjinjin commented Jan 24, 2020

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)
@sebastienros
Copy link
Member

How can we repro this issue?

@sebastienros sebastienros added this to the backlog milestone Jan 30, 2020
@eybye
Copy link

eybye commented Feb 6, 2020

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

@Ujinjinjin
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants