Solved

How to run a directorysearcher from one domain to another.

Posted on 2012-04-05
2
260 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 500 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

Technology Partners: 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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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