PC Review


Reply
Thread Tools Rate Thread

ADSI question

 
 
Jason MacKenzie
Guest
Posts: n/a
 
      15th Jul 2004
I have an vb.net method where I want to take a comma delimited list of AD
groups , split them into an array and loop through the groups returning all
users who are a member of the groups. I've eliminated most of the code to
show the example below:



For icount = GroupList.GetLowerBound(0) To
GroupList.GetUpperBound(0)

Dim oMembers As DirectoryEntry = New
DirectoryEntry("WinNT://" & GetDomainName() & "/" & GroupList(icount) &
",group", GetDomainName() & "\" & GetAdminUserName(), GetAdminPassword())


Dim MembersCollection As IADsMembers

MembersCollection = oMembers.Invoke("Members")


oMembers.Close()
oMembers.Dispose()


Next

The first time through the loop everything works great, but the second time
through the loop I get "The network path was not found". It doesn't matter
which groups are first - it always works and the second always fails. It
fails on the MembersCollection = oMembers.Invoke("Members") line.

Any ideas why this is happening are appreciated,

Jason MacKenzie



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADSI Question =?Utf-8?B?VmlrYXMgTWFuZ2hhbmk=?= Microsoft Dot NET Framework 0 16th Aug 2006 11:16 AM
IIS and ADSI question Mutley Microsoft ASP .NET 0 6th Feb 2006 03:33 PM
ADSI and Exchange question Bingo Microsoft Outlook VBA Programming 2 2nd Dec 2004 04:01 PM
Re: ADSI Question Arvind Rangan Microsoft Dot NET Framework 0 28th Oct 2003 01:22 PM
Re: ADSI Edit question Matjaz Ladava [MVP] Microsoft Windows 2000 Active Directory 3 29th Jul 2003 04:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:12 AM.