May 22, 200619 yr Bonjour, je rencontre un petit soucis. J'ai une fonction pour changer mon mot de passe dans l'active directory de windows 2003 server que j'ai installé sur VMWare Workstation. La fonction marche très bien dans l'active directory de l'entreprise, par contre quand j essaye de le changer sur mon serveur virtuel (installé sur VMWAre donc) je n y arrive pas. Voici le code: Public Function ChangementMdp(ByVal username As String, ByVal password As String, ByVal newpassword As String) As Boolean Try Dim searcher As DirectorySearcher Dim result As SearchResult Dim params() As String = index.GetCle() Dim path As String = "LDAP://" & params(4) Dim DirEntry As DirectoryEntry = New DirectoryEntry(path, username, password) DirEntry.UsePropertyCache = False searcher = New DirectorySearcher(DirEntry) searcher.Filter = "(SAMAccountName=" & username & ")" result = searcher.FindOne() DirEntry = result.GetDirectoryEntry DirEntry.NativeObject.ChangePassword(password, newpassword) DirEntry.CommitChanges() Session("USERNAME") = "" ChangementMdp = True HttpContext.Current.Response.Write(index.Redirect("index.aspx", 0)) Catch e As Exception System.Diagnostics.Debug.WriteLine("Erreur lors du changement de mot de passe: ") System.Diagnostics.Debug.WriteLine(e) ChangementMdp = False End Try End Function Et l'erreur renvoyée est la suivante: System.Runtime.InteropServices.COMException (0x80070547): Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
May 22, 200619 yr Author Ouai jte dis pas c'est la merde :( Ici j'ai changé le path, j'ai mis Dim path As String = "LDAP://" & params(4) & "/DC=baxter,DC=local" Mais ca ne marche toujours pas :(
Archived
This topic is now archived and is closed to further replies.