?
Solved

How to run a directorysearcher from one domain to another.

Posted on 2012-04-05
2
Medium Priority
?
261 Views
Last Modified: 2012-04-12
Hello,
I have an asp.net application developed which has a class that has directoryservices referenced in it. The purpose is to use the directory searcher(LDAP) to locate the details from an active directory. In this case lets say we have two domains. First domain called DomainA, and second one called DomainB.

Now I have my web server hosted on DomainB. However the active directory in that domain does not have many of the user details that I want, and so my asp.net application will have to look into DomainA active directory from the iis installed on DomainB.

What is the best way to do this.
0
Comment
Question by:DoubtMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Vikram Singh Saini earned 1500 total points
ID: 37813178
I can't say about best method. But for problem I would have passed modified path for domain A as:

string adminPath = @"LDAP://DomainControllerB.Domain.Parts/OU=USERS,OU=RJSO,OU=MARKETING,DC=Domain,DC=Parts"/";

 DirectoryEntry AD= new DirectoryEntry(adminPath, adUser, adPass, AuthenticationTypes.Secure);

public static void ShowDetails(string adminPath)
    {
using (DirectorySearcher ds = new DirectorySearcher(AD))
                {
                    // Code implementation here
                }
}

// Code here for rechecking by passing adminPath and other fields for domain A to above function.

Open in new window

0
 

Author Closing Comment

by:DoubtMan
ID: 37837794
Thanks . that helped.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question