Using DsmlDirectoryIdentifier : Dsml : Network C# Source Code


Custom Search

C# Source Code » Network » Dsml »

 

Using DsmlDirectoryIdentifier








    
 
using System;
using System.Net;
using System.DirectoryServices;
using System.DirectoryServices.Protocols;

public class MainClass {
    public static void Main() {
        Uri uri = new Uri("http://yourSite/dsml1");
        DsmlDirectoryIdentifier identifier = new DsmlDirectoryIdentifier(uri);

        NetworkCredential credentials = new NetworkCredential();
        credentials.UserName = "yourName";
        credentials.Password = "password";

        DsmlSoapHttpConnection connection = new DsmlSoapHttpConnection(identifier, credentials);
        connection.BeginSession();

        string distinguishedname = "yourName";
        string ldapFilter = "object=user";
        string[] attributes = new string[1];

        DirectoryRequest request = new SearchRequest(distinguishedname, ldapFilter, System.DirectoryServices.Protocols.SearchScope.Subtree, null);

        DirectoryResponse response = connection.SendRequest(request);


        connection.EndSession();
    }

}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Network
» Dsml