jusbuc2k / Justin.AspNetCore.LdapAuthentication

LDAP based password authentication for ASP.NET Identity
MIT License
57 stars 19 forks source link

The LDAP Hostname cannot be empty or null #1

Closed linflux closed 7 years ago

linflux commented 7 years ago

Hi Justin Buchanan, i follow the steps in getting started, but when i try to login i receive and error. An unhandled exception occurred while processing the request.

InvalidOperationException: The LDAP Hostname cannot be empty or null. Justin.AspNetCore.LdapAuthentication.LdapAuthentication.ValidatePassword(string distinguishedName, string password)

AccountController.cs var result = await _signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, lockoutOnFailure: false); `

Already double check the creation of LdapAuth settings in appsettings.json.

jusbuc2k commented 7 years ago

Hello @linflux,

Can you ensure you are calling services.Configure<Justin.AspNetCore.LdapAuthentication.LdapAuthenticationOptions>(this.Configuration.GetSection("LdapAuth")); before your call to services.AddIdentity(...) in the Startup.cs ? If you have, it might help if you attached a copy of your appsettings.json and your Startup.cs file. to help me diagnose the problem.

Thanks

jusbuc2k commented 7 years ago

I'm going to close this issue for now since I never heard back from you. Feel free to re-open if you have further issues on this topic.