Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Does this work with IdentityServer4 ? #35

Open
jalchr opened this issue Dec 21, 2018 · 1 comment
Open

Does this work with IdentityServer4 ? #35

jalchr opened this issue Dec 21, 2018 · 1 comment

Comments

@jalchr
Copy link

jalchr commented Dec 21, 2018

Great library,
We are investigating using IdentityServer4 for authentication and currently all MongoDb versions are not working well.
My question, have you tried using your library (with Identity support) in any production solutions like IdentityServer4?
P.S: I'll give it a try

@jalchr
Copy link
Author

jalchr commented Dec 21, 2018

here are some logs

StsServerIdentity> Application startup exception: System.AggregateException: One or more errors occurred. (Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(System.Type, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource, Boolean)'.) ---> System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(System.Type, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource, Boolean)'.
StsServerIdentity>    at Blueshift.EntityFrameworkCore.MongoDB.Metadata.Conventions.MongoDbRegisterKnownTypesConvention.Apply(InternalEntityTypeBuilder entityTypeBuilder)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnEntityTypeAdded(InternalEntityTypeBuilder entityTypeBuilder)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.RunVisitor.VisitOnEntityTypeAdded(OnEntityTypeAddedNode node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnEntityTypeAddedNode.Accept(ConventionVisitor visitor)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionVisitor.Visit(ConventionNode node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionVisitor.VisitConventionScope(ConventionScope node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionBatch.Run()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionBatch.Dispose()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(TypeIdentity& type, ConfigurationSource configurationSource, Boolean allowOwned, Boolean throwOnQuery)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(Type type, ConfigurationSource configurationSource, Boolean allowOwned, Boolean throwOnQuery)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.ModelBuilder.Entity(Type type)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelCustomizer.FindSets(ModelBuilder modelBuilder, DbContext context)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelCustomizer.Customize(ModelBuilder modelBuilder, DbContext context)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.<>c__DisplayClass5_0.<GetModel>b__1()
StsServerIdentity>    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
StsServerIdentity>    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
StsServerIdentity>    at System.Lazy`1.CreateValue()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__7_2(IServiceProvider p)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.Set[TEntity]()
StsServerIdentity>    at Blueshift.Identity.MongoDB.MongoDbUserStore`8.FindByEmailAsync(String normalizedEmail, CancellationToken cancellationToken)
StsServerIdentity>    at Microsoft.AspNetCore.Identity.UserManager`1.FindByEmailAsync(String email)
StsServerIdentity>    --- End of inner exception stack trace ---
StsServerIdentity>    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
StsServerIdentity>    at StsServerIdentity.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\temp\AspNet5IdentityServerAngularImplicitFlow-master\src\StsServerIdentity\Startup.cs:line 244
StsServerIdentity> --- End of stack trace from previous location where exception was thrown ---
StsServerIdentity>    at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
StsServerIdentity>    at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
StsServerIdentity>    at Microsoft.AspNetCore.Server.IISIntegration.IISSetupFilter.<>c__DisplayClass4_0.<Configure>b__0(IApplicationBuilder app)
StsServerIdentity>    at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
StsServerIdentity>    at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
StsServerIdentity>    at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
StsServerIdentity> ---> (Inner Exception #0) System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(System.Type, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource, Boolean)'.
StsServerIdentity>    at Blueshift.EntityFrameworkCore.MongoDB.Metadata.Conventions.MongoDbRegisterKnownTypesConvention.Apply(InternalEntityTypeBuilder entityTypeBuilder)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnEntityTypeAdded(InternalEntityTypeBuilder entityTypeBuilder)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.RunVisitor.VisitOnEntityTypeAdded(OnEntityTypeAddedNode node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnEntityTypeAddedNode.Accept(ConventionVisitor visitor)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionVisitor.Visit(ConventionNode node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionVisitor.VisitConventionScope(ConventionScope node)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionBatch.Run()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ConventionBatch.Dispose()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(TypeIdentity& type, ConfigurationSource configurationSource, Boolean allowOwned, Boolean throwOnQuery)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Entity(Type type, ConfigurationSource configurationSource, Boolean allowOwned, Boolean throwOnQuery)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.ModelBuilder.Entity(Type type)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelCustomizer.FindSets(ModelBuilder modelBuilder, DbContext context)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelCustomizer.Customize(ModelBuilder modelBuilder, DbContext context)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.<>c__DisplayClass5_0.<GetModel>b__1()
StsServerIdentity>    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
StsServerIdentity>    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
StsServerIdentity>    at System.Lazy`1.CreateValue()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__7_2(IServiceProvider p)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
StsServerIdentity>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
StsServerIdentity>    at Microsoft.EntityFrameworkCore.DbContext.Set[TEntity]()
StsServerIdentity>    at Blueshift.Identity.MongoDB.MongoDbUserStore`8.FindByEmailAsync(String normalizedEmail, CancellationToken cancellationToken)
StsServerIdentity>    at Microsoft.AspNetCore.Identity.UserManager`1.FindByEmailAsync(String email)<---
StsServerIdentity> 

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

No branches or pull requests

1 participant