1

I am trying to set up a custom ASP.NET membership provider to authenticate using LDAP and Apache DS. This is what my web.config entry looks like:

<membership defaultProvider="DefaultMembershipProvider">
  <providers>
<add name="DefaultMembershipProvider"
     type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     connectionStringName="ADConnectionString"
     connectionProtection="None"
     connectionUsername="uid=myid, O=this domain"
     connectionPassword="mypwd"
     attributeMapUsername="sAMAccountName"
     enableSearchMethods="True" />

I am not having much luck here, probably owing to the fact that I have no idea what I am doing. I am hoping someone can at least verify I am headed in the right direction?

4

1 回答 1

1

您不能将 ActiveDirectoryMembershipProvider 用于 LDAP,它需要一个真正的 ActiveDirectory 服务器。除非 Apache DS 模拟 AD,否则您将无法使用它。

您将要做一个自定义会员提供程序。这里有一个工作示例:

http://forums.asp.net/t/970391.aspx/1

于 2012-05-14T21:15:41.773 回答