TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
thomas05
NA
1
0
binding to active directory to change password
Nov 8 2004 10:47 AM
This is my code. I keep getting an error message. any advice. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Try Dim entry As DirectoryEntry = New DirectoryEntry("ldap://ou=windows XP, OU=Managed Computers, DC=puc, DC=state, DC=oh, DC=us", Username.Text, Password.Text, AuthenticationTypes.Secure) Dim Dsearch As DirectorySearcher = New DirectorySearcher(entry) 'Dim entry As DirectoryEntry = New DirectoryEntry '("ldap://ou=windows XP, OU=Managed Computers, DC=puc, DC=state, DC=oh, DC=us", "username", "password") Dsearch.Filter = "(&(objectClass=user)(l=" + Name + "))" Dim bindCheck As Object = entry.NativeObject entry.NativeObject.changepassword("oldpassword", "newpassword") entry.Invoke("setPassword", New Object() {"oldpassword", "newpassword"}) entry.CommitChanges() 'Finally 'If Not entry Is Nothing Then entry.Dispose() 'End Try Console.Write("successful") Console.Write("invalid") End Sub
Reply
Answers (
0
)
To hide a property in the PropertyGrid during runtime
Convert code from VB to C#