Last post Apr 24, 2015 07:56 PM by vs2010junkie
Apr 21, 2015 06:49 PM|vs2010junkie|LINK
I am attempting to set up my Active Directory Membership Provider to connect to ADLDS (Active Directory Lightweight Directory Services) and I am using the following connection string:
<add name="ADConnectionString" connectionString="LDAP://MyServer:389/CN=MyPartition,DC=ADLDS,DC=com" />
My membership configuration is the following:
<add name="ADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName" connectionUsername="mydomain\adldsconnection" connectionPassword="myPassw0rd!" />
When I attempt to connect to ADLDS, however, I always get an error message stating that I cannot establish a secure connection with the server.
Can someone please tell me what I am doing wrong? I figure that it is a problem with my MembershipProvider connection credentials since the connectionString works when I connect via ADSI Edit.
Apr 23, 2015 04:45 AM|Archer Wang|LINK
From your post, I suggest that please check your attributeMapUsername and connectionUsername whether they are correct. Besides, here is an example about how to configure ActiveDirectoryMembershipProvider, please refer to it.
<add name="ADService" connectionString="LDAP://ldapServer/" />
System.Web, Version=2.0.3600, Culture=neutral,
For more information about ActiveDirectoryMembershipProvider, please refer to the below link.
Apr 23, 2015 12:24 PM|Nikunj Bhanushali|LINK
You have to be first sure that you are able to access LDAP with given account information. You can use LDAP Browser free trial version to explore AD connection. Try it here http://www.ldapadministrator.com/
Apr 24, 2015 07:56 PM|vs2010junkie|LINK
I found the answer here:
This is what the configuration information should look like:
<add name="adamConnection" connectionString="LDAP://localhost:389/OU=ApplicationUsers,O=MyOrganization,DC=corsair,DC=com"/>
<add name="adamprovider" type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="adamConnection" connectionProtection="None" attributeMapUsername="userPrincipalName" connectionUsername="CN=ApplicationUsersAdministrator,OU=PartitionUserAccounts,O=MyOrganization,DC=corsair,DC=com" connectionPassword="pass!word1" />