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. about computer in a domain

about computer in a domain

Scheduled Pinned Locked Moved ASP.NET
tutorialhelp
2 Posts 2 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.
  • A Offline
    A Offline
    Allah Kaa Bandaa
    wrote on last edited by
    #1

    hi all, I want to display a list of computers available at that domain at runtime. So that user can select computer name from it..... Can some body tell me how to do it....... Also can i restrict this list according to some criteria. For example, this list only display the computer names which have some specific application installed( e.g dot net frame work etc. ) I need urgent help, if some body can help me, i will be very much thankful to him.

    P 1 Reply Last reply
    0
    • A Allah Kaa Bandaa

      hi all, I want to display a list of computers available at that domain at runtime. So that user can select computer name from it..... Can some body tell me how to do it....... Also can i restrict this list according to some criteria. For example, this list only display the computer names which have some specific application installed( e.g dot net frame work etc. ) I need urgent help, if some body can help me, i will be very much thankful to him.

      P Offline
      P Offline
      Phil Hobgen
      wrote on last edited by
      #2

      Hi, Put a textbox (multiline) and a button on a form, try this button click handler, as a start:

      private void button1_Click(object sender, System.EventArgs e)
      {
      DirectoryEntry de = new DirectoryEntry("LDAP://myserver.mydomain");
      DirectorySearcher ds = new DirectorySearcher(de);
      ds.Filter = ("(objectClass=computer)");
      foreach(SearchResult res in ds.FindAll())
      {
      textBox1.AppendText(res.GetDirectoryEntry().Name + System.Environment.NewLine);
      }
      }

      Cheers Phil Hobgen barbari.co.uk Southampton, UK

      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