I'm currently doing some work on a set of classes to manage our Active Directory. In one class for example I add a property to a DirectoryEntry object. According to the value of Directo开发者_JS百科ryEntry.Properties.Count the property was added successfully. Before calling CommitChanges() to save the new property permanently I'd like to be able to pass credentials using the Username and Password poperties of the DirectoryEntry object. As soon as I set a value for Username, the previously added property is being removed.
Why?
I might as well pass credentials when creating the DirectoryEntry but it would be some kind of a disadvantage for the design of my class.
Hope anyone can help.
Thanks in advance.
Kevin.
Got the answer: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/37c733cb-cb46-410d-b3a7-69bd557e9846
精彩评论