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

IdentityService MongoDB Intigration not work #794

Closed
panyang1217 opened this issue Feb 12, 2019 · 0 comments
Closed

IdentityService MongoDB Intigration not work #794

panyang1217 opened this issue Feb 12, 2019 · 0 comments

Comments

@panyang1217
Copy link

panyang1217 commented Feb 12, 2019

When I use Volo.Abp.IdentityServer.MongoDB.AbpIdentityServerMongoDbModule in my web site, I got a fatal exception that is about Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository can not be resolved.

But Volo.Abp.IdentityServer.EntityFrameworkCore.AbpIdentityServerEntityFrameworkCoreModule is ok.

And I've tried compare the variable "services" in ConfigureServices method, found that below info when using Volo.Abp.IdentityServer.EntityFrameworkCore.AbpIdentityServerEntityFrameworkCoreModule.

[890] Lifetime = Transient, ServiceType = {Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository}, ImplementationType = {Volo.Abp.IdentityServer.Grants.PersistentGrantRepository} Microsoft.Extensions.DependencyInjection.ServiceDescriptor

But there is nothing about ServiceType of Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository when using Volo.Abp.IdentityServer.MongoDB.AbpIdentityServerMongoDbModule.

This is the detial of this Exception

Autofac.Core.DependencyResolutionException
HResult=0x80131500
Message=An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = PersistedGrantStore (ReflectionActivator), Services = [IdentityServer4.Stores.IPersistedGrantStore], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.Abp.IdentityServer.Grants.PersistedGrantStore' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository persistentGrantRepository' of constructor 'Void .ctor(Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository, Volo.Abp.ObjectMapping.IObjectMapper, Volo.Abp.Guids.IGuidGenerator)'. (See inner exception for details.)
Source=Autofac
StackTrace:
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.TestService(IServiceProvider serviceProvider, Type service, ILogger logger, String message, Boolean doThrow)
at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.Validate(IApplicationBuilder app)
at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.UseIdentityServer(IApplicationBuilder app)
at Patritech.Felinae.AuthService.Host.AuthServiceHostModule.OnApplicationInitialization(ApplicationInitializationContext context) in C:\Users\panya_jpfidw2\Source\repos\Felinae\Felinae\src\microservices\Patritech.Felinae.AuthService.Host\AuthServiceHostModule.cs:line 50
at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
at Volo.Abp.AbpApplicationBase.InitializeModules()
at Patritech.Felinae.AuthService.Host.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\Users\panya_jpfidw2\Source\repos\Felinae\Felinae\src\microservices\Patritech.Felinae.AuthService.Host\Startup.cs:line 40

Inner Exception 1:
DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.Abp.IdentityServer.Grants.PersistedGrantStore' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository persistentGrantRepository' of constructor 'Void .ctor(Volo.Abp.IdentityServer.Grants.IPersistentGrantRepository, Volo.Abp.ObjectMapping.IObjectMapper, Volo.Abp.Guids.IGuidGenerator)'.

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

No branches or pull requests

3 participants