|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Active Directory Problems - Just like many othersdirectory developers who have problems, but I'm going to post anyway: I add a user to the container: "CN=Users,DC=my,DC=domain,DC=com" I set the following properties: oDE = GetDirectoryObject(LDAPDomain); oDEC = oDE.Children.Add("CN=" + user.UserName, "User"); oDEC.Properties["samAccountName"].Add(user.UserName); oDEC.Properties["userPrincipalName"].Add(user.UserName); oDEC.Properties["givenName"].Add(user.FirstName); oDEC.Properties["sn"].Add(user.LastName); oDEC.Properties["displayName"].Add(user.FirstName + " " + user.LastName); oDEC.Properties["accountExpires"].Add(-1) I then commit the changes and the user saves fine, with the exception that they are disabled I then try to modify the user: oDEC.Properties["userAccountControl"].Value = 512; when I commit the changes, I get the dreaded error: The server is unwilling to process the request. Can somebody tell me what that error means? Any thoughts on how to debug or toubleshoot this? Also, I tried to set the accountExpires to various long integers, but my result never changes. This is supposed to be some goofy number of 100 nanoseconds (who thought this was a good idea?) since 1/1/1600. -1 will make the account never expire, but other values (even thought I use a 64 bit integer) don't seem to work. Any help related to any of this is appreciated! Thanks - Tim Burda |
|||||||||||||||||||||||