Active Directory Trusted Domains

//Get Trusted Domains 

SearchResultCollection resultCollection = searchResultCollection; 

ArrayList arrList = new ArrayList(); 

if (resultCollection != null) 

    { 

        foreach (SearchResult sr in resultCollection) 

        { 

            DirectoryEntry entry = sr.GetDirectoryEntry(); 

            foreach (DirectoryEntry newEntry in entry.Children) 

            { 

                if (newEntry.SchemaClassName == "trustedDomain") 

                { 

                    arrList.Add(newEntry.Name.Substring(3)); 

                } 

            } 

        } 

     }

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

 

View Abdel-Rahman Awad's profile on LinkedIn

Archives

 

Rss Feed Tweeter button Facebook button Linkedin button Delicious button Digg button