ActivationException problem with registering custom SamlConfigurationResolver with Ninject

To resolving configuration at runtime i’ve implemented a custom ISamlConfigurationResolver but when trying to ctor injection i’ve got an exception. This the exception details:
Ninject.ActivationException: 'Error activating IConfiguration
No matching bindings are available, and the type is not self-bindable.
Activation path:
5) Injection of dependency IConfiguration into parameter configuration of constructor of type CachedCertificateLoader
4) Injection of dependency ICertificateLoader into parameter certificateLoader of constructor of type CertificateManager
3) Injection of dependency ICertificateManager into parameter certificateManager of constructor of type SamlServiceProvider
2) Injection of dependency ISamlServiceProvider into parameter samlServiceProvider of constructor of type SamlController
1) Request for SamlController

Suggestions:
1) Ensure that you have defined a binding for IConfiguration.
2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
3) Ensure you have not accidentally created more than one kernel.
4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.


And this is the code in Startup for registering:
//SAML SSO services
services.AddSaml();
services.AddScoped<ISamlConfigurationResolver, CustomSamlConfigurationResolver>();

What can be the cause of this problem?

The IConfiguration referred to is the Microsoft.Extensions.Configuration.IConfiguration interface.
To pinpoint the issue, if you remove the SAML code and instead include the IConfiguration parameter in one of your application’s class constructors, do you get the same error?
If not, if you put the SAML code back in but don’t add your ISamlConfigurationResolver, do you get the same error?

[quote]
ComponentSpace - 11/1/2018
The IConfiguration referred to is the Microsoft.Extensions.Configuration.IConfiguration interface.
To pinpoint the issue, if you remove the SAML code and instead include the IConfiguration parameter in one of your application's class constructors, do you get the same error?
If not, if you put the SAML code back in but don't add your ISamlConfigurationResolver, do you get the same error?
[/quote]
I've tried to ctor injection the IConfiguration and i've got this similar exception:
Ninject.ActivationException: 'Error activating IConfiguration
No matching bindings are available, and the type is not self-bindable.
Activation path:
2) Injection of dependency IConfiguration into parameter configuration of constructor of type SamlController
1) Request for SamlController

Suggestions:
1) Ensure that you have defined a binding for IConfiguration.
2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
3) Ensure you have not accidentally created more than one kernel.
4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.

And removing ISamlConfigurationResolver from ctor injection and keeping SAML SSO service registering as is, worked.

Thanks for replying on short notice.

That’s odd.
So, just to confirm, the following works.
services.AddSaml();
And the following fails.
services.AddSaml();
services.AddScoped<ISamlConfigurationResolver, CustomSamlConfigurationResolver>();
Assuming so, does CustomSamlConfigurationResolver have a dependency on IConfiguration?

[quote]
ComponentSpace - 11/2/2018
That's odd.
So, just to confirm, the following works.
services.AddSaml();
And the following fails.
services.AddSaml();
services.AddScoped();
Assuming so, does CustomSamlConfigurationResolver have a dependency on IConfiguration?

[/quote]

The following works
services.AddSaml();
services.AddScoped();

but when i try to inject(to use) ISamlConfigurationResolver via ctor then i do get the exception above. E.g. this will throw the exception:
public SamlController(ISamlConfigurationResolver samlConfigurationResolver){...}

And CustomSamlConfigurationResolver has no such dependency, no.

Would you mind zipping up a small project that I can build and run to reproduce the issue?
Please email the zip to support@componentspace.com.
Thanks.

[quote]
ComponentSpace - 11/2/2018
Would you mind zipping up a small project that I can build and run to reproduce the issue?
Please email the zip to support@componentspace.com.
Thanks.
[/quote]

Hey there, sorry for the late response.
git repository link: https://github.com/turhany/ComponentSpaceSamlNinject
Thanks.

I replied to you by email.
Your project throws an activation exception but for a different class.
This occurs whether or not the CustomSamlConfigurationResolver is registered.