locked
Active Directory User Name and details in a Domain RRS feed

  • Question

  • User-1263245844 posted

    Hi,

    I need to get the active directory username list with their personnel details from an particular domain.

    How to perform this in asp.ner

    Thanks in Advance.

    Monday, December 24, 2012 7:31 AM

Answers

  • User-1413002454 posted

     

    Web.Config:

    <membership defaultProvider="MembershipLDAPProvider">

    <providers>

    <add name="MembershipSynergyProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LDAPConnectionString" connectionUsername="..." connectionPassword="..." enableSearchMethods="true" attributeMapUsername="sAMAccountName"/>

    .

    .

    .

    <connectionStrings>

    <add name="LDAPConnectionString" connectionString="LDAP://.../DC=...,DC=...,DC=...,DC=..."/>

    Code Behind:

    ldapProvider =Membership.Providers("MembershipLDAPProvider")

    ldapProvider.GetAllUsers(...,...,,,)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 24, 2012 7:50 AM

All replies

  • User-1413002454 posted

     

    Web.Config:

    <membership defaultProvider="MembershipLDAPProvider">

    <providers>

    <add name="MembershipSynergyProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LDAPConnectionString" connectionUsername="..." connectionPassword="..." enableSearchMethods="true" attributeMapUsername="sAMAccountName"/>

    .

    .

    .

    <connectionStrings>

    <add name="LDAPConnectionString" connectionString="LDAP://.../DC=...,DC=...,DC=...,DC=..."/>

    Code Behind:

    ldapProvider =Membership.Providers("MembershipLDAPProvider")

    ldapProvider.GetAllUsers(...,...,,,)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 24, 2012 7:50 AM