Forums, Documentation & Knowledge Base - ComponentSpace

InvalidOperationException: while injecting SAMLConfiguration


https://www.componentspace.com/forums/Topic9941.aspx

By amrelsayed - 4/24/2019

Hi,

I am using ComponentSpace V2.0.2 for .Net Core and when I try to add SAML module in the startup.cs file in configureServices method as of this way below:


services.Configure<SamlConfigurations>(Configuration.GetSection("SAML"));
services.AddSaml();


it then gives me an exception: InvalidOperationException: Cannot consume scoped service 'ComponentSpace.Saml2.Configuration.SamlConfigurations' from singleton 'ComponentSpace.Saml2.Configuration.Resolver.ISamlConfigurationResolver'.

Any help on this please.

Thanks,
Amr
By ComponentSpace - 4/25/2019

You're welcome.