Closed djaiswal007 closed 4 months ago
I am not sure how to diagnose this without the code where it is used. One thing I can imagine that this is a follow-p error. Can you try to add services.AddLdapConnectionService(options);
as well?
I am working on Ldap search, so this is the only code change that i have to do right. I have posted all the code change i have done for integration
Yes, in principle this should suffice to register the service. However, the error you get should only be raised when you try to inject the service into a controller, not when registering the search service. If it does fail at this point, the only reason I see would be another dependency missing. I just had a look in the code and the only thing required here is the logger. Do you have the logging extensions (https://www.nuget.org/packages/Microsoft.Extensions.Logging/) installed?
Closing this due to inactivity.
Mentioned in appsetting.json,
"LdapConfiguration": { "Server": "serverdetail", "SearchBase": "DC=abc,DC=com", "Schema": "Active Directory", "IsRecursiveGroupMembership": true, "Port": 636, "IsSsl": true, "IsNoCertificateCheck": true, "User": "sadfsdf", "Password": "asdfsadfsadf" } In startup var options = new LdapOptions(); this.Configuration.GetSection("LdapConfiguration").Bind(options); services.AddLdapSearchService(options);
what am i missing that ILdapSearchService is not getting resolved