Results 1 to 2 of 2

Thread: System.DirectoryServices

  1. #1
    Join Date
    Dec 1969

    Default System.DirectoryServices

    Hi, I was trying to run an ASP.NET example that Imports the namespace System.DirectoryServices on my Windows 2000 server. <BR><BR>&#060;% @Import Namespace="System.DirectoryServices" %&#062;<BR>&#060;%<BR>DirectoryEntry de = new DirectoryEntry("LDAP://CN=Users,DC=ronbiedrzycki,DC=local" ,<BR>"administrator","client");<BR>foreach(Directo ryEntry child in de.Children)<BR>{ <BR>Response.Write("<BR>" + child.Name.ToString()); <BR>}<BR>%&#062;<BR>I get a compilation error:<BR>Compiler Error Message: BC30002: Type &#039;DirectoryEntry&#039; is not defined.<BR> I read this on MSDN<BR>System.DirectoryServices is supported on Windows Server 2003. System.DirectoryServices can be redistributed on Windows 98, Windows 98 SE, and Windows NT 4.0, as long as the DS Client is installed on client computers. It can also be redistributed on Windows 2000 Windows XP.<BR><BR>So since I am using Win 2000 I guess I don&#039;t have this namespace by default. How do I get the namespace?? Thanks Ron

  2. #2
    Join Date
    Dec 1969

    Default RE: System.DirectoryServices

    I am not sure if this will work because I am still figuring this out myself. But I think you can search for the system.directoryservices.dll file on the Windows 2000 server and copy it to the BIN directory within your ASP.NET application. I am using VS.Net 2003, I then went to the References section within the Solution Explorer and imported the system.directoryservices.dll. Like I said, I am not sure if this will work for you, just trying to give back the little I learned. Good Luck..Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts