Posted on: 2/1/2012 12:00:10 PM | Views : 252

? Below is the code that i am using to get information from AD. Note, i am not possing any username/password information to the DirectoryEntry object and i am using Windows Authentication.
The code works fine without any issues on my local machine. But when i deploy it on the server, it throws me error:

Exception Details: System.Runtime.InteropServices.COMException: The server is not operational

WindowsIdentity Principal; Principal = WindowsIdentity.GetCurrent(); string userInQuestion = Principal.Name.Split('\\')[1]; string myDomain = Principal.Name.Split('\\')[0]; DirectoryEntry entry = new DirectoryEntry("LDAP://" + myDomain); DirectorySearcher adSearch ...

Go to the complete details ...