Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Connect to Active directory through Biztalk
- This topic has 2 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
August 13, 2009 at 10:10 PM #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
-
August 20, 2009 at 12:49 PM #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.
-
August 23, 2009 at 11:10 PM #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
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.