Hello,
I am a new on the forum VB.net. I am French and student in computing. I am at present in summer job in the computing. Besides, I am a novice in VB.net. I am spirit to make a program to modify the directory AD of my company. I saw with computer specialists of the DSI of my company, and anybody understands this error. I use Visual Basic 2008 Express
Here is the program:
My probleme is the following one. When I launch the program, he indicates me that I have an error at the level of this line :
He indicates me that :
And in the fenetre of execution he puts me:
I does not really understand. The program is to register in VB, can be that it is the error. I have to try how to register in VB.net but I have not to find.
Thank you in advance
Reiji
I am a new on the forum VB.net. I am French and student in computing. I am at present in summer job in the computing. Besides, I am a novice in VB.net. I am spirit to make a program to modify the directory AD of my company. I saw with computer specialists of the DSI of my company, and anybody understands this error. I use Visual Basic 2008 Express
Here is the program:
VB.NET:
Module Module1
Sub main()
Dim Ldap As DirectoryEntry = New DirectoryEntry("[URL]ldap://name[/URL] AD", "Login", "password")
Dim searcher As DirectorySearcher = New DirectorySearcher((Ldap))
searcher.Filter = ""
For Each result As SearchResult In searcher.FindAll
Dim DirEntry As DirectoryEntry = result.GetDirectoryEntry()
DirEntry.Properties("Fonction").Value = ""
DirEntry.Properties("Service").Value = ""
DirEntry.Properties("Société").Value = ""
DirEntry.Properties("Téléphone").Value = ""
DirEntry.Properties("Portable").Value = ""
DirEntry.Properties("Fax").Value = ""
DirEntry.Properties("Mail").Value = ""
DirEntry.CommitChanges()
Next
End Sub
End Module
My probleme is the following one. When I launch the program, he indicates me that I have an error at the level of this line :
andDirEntry.CommitChanges()
ForEach result As SearchResult In searcher.FindAll
He indicates me that :
The Exception. DirectoryServicesCOMException was not managed:
The Attribute or the value of service of specified directory does not exist. (The Exception of HRESULT: 0x8007200A)
And in the fenetre of execution he puts me:
An exception of first luck of type ' System. DirectoryServices. DirectoryServicesCOMException ' occurred in System. DirectoryServices.dll
I does not really understand. The program is to register in VB, can be that it is the error. I have to try how to register in VB.net but I have not to find.
Thank you in advance
Reiji
Last edited: