Connect to Active directory through Biztalk

Home Page Forums BizTalk 2004 – BizTalk 2010 Connect to Active directory through Biztalk

Viewing 1 reply thread
  • Author
    Posts
    • #23034

      Hi ,

      I want to retrieve active directory user information . I have writen a standalone application & it’s worked fine for me. here is the part of the code

       

       

       

       

       

       

       

       

       

       

       

       

       

      DirectoryEntry de = new DirectoryEntry(_path, username, password);

       

       

       

      DirectorySearcher mySearcher = new DirectorySearcher();

      mySearcher.Filter =

      “(&((&(objectCategory=Person)(objectClass=User)))(samaccountname=” + staffInfo.EmployeeID  ))”;

       

       

      mySearcher.PropertiesToLoad.Add(

       

      “name”);

      result = mySearcher.FindOne();

      But when I call this through Biztalk using .net componet in orchestration I am getting the following error.

       

      Inner exception: The specified domain either does not exist or could not be contacted.

       

      Exception type: COMException

      Source: System.DirectoryServices

      Target Site: Void Bind(Boolean)

      The following is a stack trace that identifies the location where the exception occured

      at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)

      at System.DirectoryServices.DirectoryEntry.Bind()

      at System.DirectoryServices.DirectoryEntry.get_AdsObject()

      at System.DirectoryServices.PropertyValueCollection.PopulateList()

      at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)

      at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)

      at System.DirectoryServices.DirectorySearcher.get_SearchRoot()

      at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)

      at System.DirectoryServices.DirectorySearcher.FindOne()

       

      Can any one help me why this is happening. Do I need to do add this active directory user to Biztalk group?

      Thank you,

      Best regards,

      Nandika

    • #23073

      Hi Nandika,

      Have you tried running this standalone application on its own and what are the results? Are you getting the error message in that case too? This is most likely something to do with you .NET code and not specific to BizTalk.

      Dan.

      • #23097

        Thanks for your reply. It was running in standalone app. Anyway I have resolved this using the seachroot with Directory seacher. 

         

        Best regards,

        Nandika

         

         

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.