Re: change password in active directory by webapplication (vb.net)
From: Sara rafiee (sara_ir110_at_yahoo.com)
Date: 04/27/04
- Previous message: johndoe_at_driver.net: "Re: Custumizing Pages based on security status"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 26 Apr 2004 20:32:39 -0700
Hi
let me explain it clearly
I have a form which has three textbox, to get user information. first
textbox is username, second one is user_old_password and third one is
user_new_password. with that code when user entered request part and
click on submit button I want that this user at first checked with
active directory and then if he entered his username and old_password
correctly ; I mean the result of search is one then the new password set
instead of old one. but up to now I wasn't success in it. if you need
any more details I will tell you more. thanks...
Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn1.Click
Dim entry As DirectoryEntry = New
DirectoryEntry("LDAP://Hosnieh_Rafiee", username.Text, oldpass.Text,
AuthenticationTypes.Secure)
Dim search As New DirectorySearcher(entry)
Dim result As SearchResult = search.FindOne
If Not result Is Nothing Then
entry.Invoke("setPassword", New Object() {newpass.Text})
entry.CommitChanges()
Response.Write("successful")
Else
Response.Write("invalid")
End If
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Previous message: johndoe_at_driver.net: "Re: Custumizing Pages based on security status"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]