Subject: Howto create Distribution list
Posted By: Alcapone Post Date: 10/28/2004 5:56:29 AM
Hi,

Anybody have any idea how to create a distribution list?

Must thanks!!!

Reply By: Alcapone Reply Date: 11/1/2004 5:25:21 AM
This is the code i use:

DirectoryEntry objEntry;
DirectoryEntry objNewEntry;
objEntry = new DirectoryEntry(strPath);        
DirectoryEntry ou = objEntry.Children.Find("OU=Distribution") ;
objNewEntry = ou.Children.Add("cn="+cmb_curs.SelectedItem.ToString(), "group") ;
objNewEntry.Properties["groupType"].Value = ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_GLOBAL_GROUP ;
objNewEntry.CommitChanges();

After running the code it gives me the follwing error:
A constraints violation occured

Anybody have any idea why i get this error?

Regards,
Martijn

Go to topic 21428

Return to index page 727
Return to index page 726
Return to index page 725
Return to index page 724
Return to index page 723
Return to index page 722
Return to index page 721
Return to index page 720
Return to index page 719
Return to index page 718