You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Everyone,
I am having an issue when i call UseIdentityServer(). I am adding the appropriate middleware.
services.AddDbContext(options =>
options.UseSqlServer(_config.GetConnectionString("DefaultConnection")));
When I run the app and call on the discovery document i get a nullreferencexception
NullReferenceException: Object reference not set to an instance of an object.
Microsoft.Extensions.DependencyInjection.ConfigureApiResources.GetApiResources()+MoveNext()
Microsoft.Extensions.DependencyInjection.ConfigureApiResources.Configure(ApiAuthorizationOptions options)
Microsoft.Extensions.Options.OptionsFactory.Create(string name)
Microsoft.Extensions.Options.OptionsManager+<>c__DisplayClass5_0.b__0()
System.Lazy.ViaFactory(LazyThreadSafetyMode mode)
System.Lazy.ExecutionAndPublication(LazyHelper executionAndPublication, bool useDefaultConstructor)
System.Lazy.CreateValue()
System.Lazy.get_Value()
Microsoft.Extensions.Options.OptionsCache.GetOrAdd(string name, Func createOptions)
Microsoft.Extensions.Options.OptionsManager.Get(string name)
Microsoft.Extensions.Options.OptionsManager.get_Value()
Microsoft.Extensions.DependencyInjection.IdentityServerBuilderConfigurationExtensions+<>c.b__7_1(IServiceProvider sp)
My appsettings schema looks like this
"IdentityServer": {
"Resources": {
"MyAPI": {
"Profile": "API",
"Scopes": "Integration Int Integ"
}
},
"Clients": {
"MyApp": {
"Profile": "SPA"
}
},
"Key": {
"Type": "File",
"FilePath": "MyCert.pfx",
"Password": "Cert123"
}
}
}
I looked at the source code for the ConfigureApiResources.cs in the package and i dont see anything in there that would help.
Any help would be greatly appreciated!!!! Thank you
Beta Was this translation helpful? Give feedback.
All reactions