First, I covered most of the questions about SO, but none of them are exactly the same problem. Here is a similar question, but not quite the same. In my circumstances, I create a PrincipalContext as such:
Dim pctx As PrincipalContext = New PrincipalContext(ContextType.Domain, fullyqualifieddomain, container, ADUserID, ADPassword)
If pctx.ValidateCredentials(userName, password) Then
ADUserID is a service account.
This method works, but takes more than 6-10 seconds.
I also tried to directly restore the main entry in the directory and bind it. This is much faster and works on my machine (which is located outside the domain), but not on the web server (which is located inside the domain). It does not work when calling DirectoryEntry.NativeObject. I do not know why. Unfortunately, I am in a situation where the only way that works is too slow to be feasible. Is there any way to speed this up?
Thanks in advance!
source
share