Re: change password in active directory by webapplication (vb.net)

From: Sara rafiee (sara_ir110_at_yahoo.com)
Date: 04/27/04

  • Next message: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"
    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!


  • Next message: Joe Kaplan \(MVP - ADSI\): "Re: change password in active directory by webapplication (vb.net)"

    Relevant Pages

    • Re: Send Email Using VB 2008 Express
      ... Create a To TextBox, and name it 'txtTo' ... Private _Username As String ... Public Property UserName() As String ... Private Sub btnSend_Click(ByVal sender As System.Object, ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Password Login - Auto Populate Fields
      ... You should be using the DefaultValue property of those textboxes to provide ... just set the DefaultValue of the textbox to: ... For the username field, I suggest you use a global variable and a function ... just data entry. ...
      (microsoft.public.access.formscoding)
    • Session Not Maintaing State
      ... A ASPX Form has a TextBox & a Button. ... Users enter their username in ... The DataGrid also provides pagination. ... Dim strUserName As String ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Session Not Maintaing State
      ... The DataGrid also provides pagination. ... Dim strUserName As String ... Assume that I enter the username Ronnie in the TextBox & submit the ...
      (microsoft.public.dotnet.framework.aspnet)