开发者

Active Directory Membership Provider with AD LDS

I am trying to create web app that is using ActiveDirectoryMembership with AD LDS When I try to register a new user, or login with existing user, I am getting this error "If either of the properties connection-username or connection-password is specified, the other must also be specified" And I am getting a similar error when I am trying to use "ASP.NET configuration" My web.config looks like this, and as you can see I am providing both the username and password:

<connectionStrings>
    <add name="ADService" connectionString="LDAP://localhost:5000/OU=Users,O=TestDirectory"/>
  </connectionStrings>

  <system.web>

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" defaultUrl="default.aspx"/>
    </authentication>


    <membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
      <providers>
        <add name="AspNetActiveDirectoryMembershipProvider" 
    connectionStringName="ADService" 
    connectionUserName="CN=ADAMAdmin,OU=Users,O=TestDirectory" connectionPassword="admin"
             type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f1开发者_开发知识库1d50a3a"
             connectionProtection="None"/>
      </providers>
    </membership>


Typically username is in the format Domain\Username.

Additionally the property is connectionUsername not connectionUserName (note the lowercase n).


The attributes are case-sensitive. Try 'connectionUsername' instead of 'connectionUserName'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜