|
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
|