Luis Aguilar
Luis Aguilar

Reputation: 4381

Active Directory LDS Exception

Hey stack! I just installed a AD LDS instance in my development machine. The config is the following:

<membership defaultProvider="ActiveDirectoryProvider">
      <providers>
        <add name="ActiveDirectoryProvider" 
             connectionStringName="ActiveDirectoryConnection" 
             connectionUsername="CN=adldsadmin,CN=Users,CN=TestNet,DC=contoso,DC=com" 
             connectionPassword="123456" type="System.Web.Security.ActiveDirectoryMembershipProvider,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             connectionProtection="None"
             enableSearchMethods="true"
             applicationName="App1" />
      </providers>
    </membership>

How ever I get the following exception:

The specified directory service attribute or value does not exist.

The adldsadmin user is in all of the groups. What am I doing wrong?

Thanks!

Upvotes: 3

Views: 1690

Answers (1)

Luis Aguilar
Luis Aguilar

Reputation: 4381

Okay, I found what the problem was. Apparently something to do with authentication. The solution is:

  1. Open the command prompt in administrator mode.
  2. Type cd %windir%
  3. Type dsmgmt and press enter.
  4. Type the following commands pressing enter after each line:

    ds behavior
      connections
        connect to server localhost:389
        quit
      allow passwd op on unsecured connection
      quit
    

    quit

Now it should work.

Upvotes: 5

Related Questions