We have a VB.NET application that uses LDAP to authenticate users through Active Directory.
Never had an issue before but this afternoon my co-worker applied Windows Updates and restarted our domain controller (and AD server) and now whenever anyone tries to login and use the application they get the following error:
Error Number: -2147016646
Error Descr: The server is not operational.
Using the following code to authenticate:
Dim adEntry As New System.DirectoryServices.DirectoryEntry("LDAP://" & gsDomainName, sUserName, sPassword)
Dim adSearcher As New System.DirectoryServices.DirectorySearcher(adEntry)
adSearcher.SearchScope = DirectoryServices.SearchScope.OneLevel
Try
Dim adResults As System.DirectoryServices.SearchResult = adSearcher.FindOne
...
It fails on the adSearcher.FindOne
piece of code.
The immediate window gives more detailed error information
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in System.DirectoryServices.dll
Anyone have any ideas?
Things I've tried:
Flushing the DNS on the domain controller
Restarting the DHCP server
Restarting DNS services.
Thanks!