问题
I'm looking to try out using simpleMembership but connect it to our LDAP. I haven't seen anything online about doing this, only with SQL. Does anyone know if it's possible and could lead me in the right direction?
回答1:
I think you'd need to create a class which inherits from ExtendedMembershipProvider and write the LDAP implementation. There's no built-in LDAP support.
See this post for more information on how SimpleMembership works in ASP.NET MVC 4.
回答2:
I'm not certain, but ActiveDirectoryMembershipProvider may be able to be configured to connect to a different LDAP provider. You mentioned in an earlier response that you're using Active Directory so it may even be a non-issue.
http://msdn.microsoft.com/en-us/library/system.web.security.activedirectorymembershipprovider.aspx
来源:https://stackoverflow.com/questions/12200616/mvc-4-simplemembership-with-ldap