Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / January 2008

Tip: Looking for answers? Try searching our database.

How can I get all the root domains of a forest?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pucca - 17 Jan 2008 22:21 GMT
Hi, I'm using vs2005 and .net 2.  I got the current forest and I want to get
all the root domain of all domain trees in a forest.  I use
forest.RootDomain.Name and got one of the root domain.  But, how can I get
all the other root domains?  Thank you.
Signature

Thanks.

Joe Kaplan - 21 Jan 2008 03:56 GMT
I think there is only supposed to be one root domain by definition.  Can you
explain a situation where you think you have more than one?

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> Hi, I'm using vs2005 and .net 2.  I got the current forest and I want to
> get
> all the root domain of all domain trees in a forest.  I use
> forest.RootDomain.Name and got one of the root domain.  But, how can I get
> all the other root domains?  Thank you.
Pucca - 21 Jan 2008 04:35 GMT
I'm trying to contruct multiple domain trees in a forest.  Each tree would
have its own root domain.  The Forest class returns the First created domain
as the rootdomain and I use that to build just one of the domain treen.  When
there are more than one domain tree in the forest then how can I get hold of
the "frist domain" of the 2nd domain tree?  Thank you.
Signature

Thanks.

> I think there is only supposed to be one root domain by definition.  Can you
> explain a situation where you think you have more than one?
[quoted text clipped - 6 lines]
> > forest.RootDomain.Name and got one of the root domain.  But, how can I get
> > all the other root domains?  Thank you.
Joe Kaplan - 21 Jan 2008 14:22 GMT
Are you talking about a domain with a disjoint namespace?  I'm really not
sure how the API is supposed to behave here or what the rules are.  I think
you might need to esclate your question to Microsoft PSS.

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> I'm trying to contruct multiple domain trees in a forest.  Each tree would
> have its own root domain.  The Forest class returns the First created
[quoted text clipped - 18 lines]
>> > get
>> > all the other root domains?  Thank you.
Pucca - 21 Jan 2008 14:59 GMT
Hi Joe,
I'm not looking for a domain with a disjoint namespace.  I'm trying to
re-create the domains browser that you would see in the AD user and Computer
when you select to Connect To Domain and click the Browe button in that
dialog.  Let say in this browsing dialog, you would see 2 domain nodes as
siblings on the same root leve.  One can drill down on each of these 2 domain
nodes to see its children domains.
I need to retrieve these type of information from AD and build the same
domain trees in this browser.  I've looked at the Forest and the Domain
classes and didn't find the attributes that I can use for finding the 2nd
domain tree.  The forest.rootdomain returns only the rootdomain for one of
the domain tree.  If I look at forest.domains it does return the rootdomain
for the 2nd domain tree but I have no way of telling that it is a sibling
node of the 1st domain tree's rootdomain.  Do you know how I can get the
information I need?  Thank you.
Signature

Thanks.

> Are you talking about a domain with a disjoint namespace?  I'm really not
> sure how the API is supposed to behave here or what the rules are.  I think
[quoted text clipped - 24 lines]
> >> > get
> >> > all the other root domains?  Thank you.
Joe Kaplan - 21 Jan 2008 15:32 GMT
Did you look at the Parent property on the Domain object?  That should
return the parent of any given domain or null if it has no parent, so that
should be another way you can rebuild the tree.

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> Hi Joe,
> I'm not looking for a domain with a disjoint namespace.  I'm trying to
[quoted text clipped - 49 lines]
>> >> > get
>> >> > all the other root domains?  Thank you.
Pucca - 21 Jan 2008 16:41 GMT
Yes, I did try the parent property over the weekend.  The problem is when the
root domain of the 2nd domain tree is not avaiable (the DC is down), My code
then throws an exceptioin for trying the examin the Domain object.  For the
same scenario, the AD Users and Compute snap-in is able to still list out all
the domain trees.  They must be accessing it in a different way.  Is there
another way to do this?  Thank you.
Signature

Thanks.

> Did you look at the Parent property on the Domain object?  That should
> return the parent of any given domain or null if it has no parent, so that
[quoted text clipped - 55 lines]
> >> >> > get
> >> >> > all the other root domains?  Thank you.
Joe Kaplan - 21 Jan 2008 19:04 GMT
That I have no idea on.  Sorry.  I'm not sure who will.  It does sound like
they are using a different API, but I don't know what that is.  Maybe it is
all based on DNS queries or something.

Joe K.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> Yes, I did try the parent property over the weekend.  The problem is when
> the
[quoted text clipped - 76 lines]
>> >> >> > get
>> >> >> > all the other root domains?  Thank you.
Pucca - 21 Jan 2008 19:17 GMT
Thank you for all your help. I will look into DNS.  
Signature

Thanks.

> That I have no idea on.  Sorry.  I'm not sure who will.  It does sound like
> they are using a different API, but I don't know what that is.  Maybe it is
[quoted text clipped - 82 lines]
> >> >> >> > get
> >> >> >> > all the other root domains?  Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.