Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Search Active Directory Help

Search Active Directory Help

Scheduled Pinned Locked Moved ASP.NET
csharpcomwindows-adminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soloforce
    wrote on last edited by
    #1

    Im new to c# asp programing and would like some help with the following. I’m trying to search active directory for a specific users “schenkp” for this case and have results outputting to a list box. Say the user is schenkp I would like to know what groups he is a member of that have the specific word “owner”. I have a web page that consist of a button, list box and a text box. This code works and returns all the member of the active directory so far when I click the button. private void Button1_Click(object sender, System.EventArgs e) { DirectoryEntry de = new DirectoryEntry("LDAP://GCM.COM/ou=user accounts,ou=accounts,dc=gcm,dc=com","user","password"); foreach(DirectoryEntry child in de.Children) { ListBox1.Items.Add(child.Name.Remove(0,3)); } } Any help would be greatly appreciated,

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups