I am working with LDAP but it keeps giving me error "The server is not operational". I thought may be I am using wrong credential. Therefore I tried with Google and it did not help me.
Enclosed please find my code:-
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://www.google.com:389/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))
{
dir2.RefreshCache();
DirectorySearcher adSearch = new DirectorySearcher(dir2);
adSearch.Filter = "(&(objectClass=*)(msExchRecipientDisplayType=7))";
SearchResultCollection adResult = adSearch.FindAll();
It gives me error on : dir2.RefreshCache();
I am not sure, what I am doing wrong. I have tried with different LDAP values like :-
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://ldap.google.com/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP:///DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))
But nothing really helped me.
Enclosed please find the stack trace:
COMException (0x8007203a): The server is not operational.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.RefreshCache()
at Test_Exchange.Program.Main(String[] args) in C:\Inetpub\wwwroot\Test Exchange\Test Exchange\Program.cs:line 26
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I have tried to follow the enclosed link as well but no help:
Ratika
0 Points
5 Posts
Issue with LPAD and gives error The server is not operational
Nov 22, 2012 05:29 PM|LINK
Hi,
I am working with LDAP but it keeps giving me error "The server is not operational". I thought may be I am using wrong credential. Therefore I tried with Google and it did not help me.
Enclosed please find my code:-
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://www.google.com:389/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption)) { dir2.RefreshCache(); DirectorySearcher adSearch = new DirectorySearcher(dir2); adSearch.Filter = "(&(objectClass=*)(msExchRecipientDisplayType=7))"; SearchResultCollection adResult = adSearch.FindAll();It gives me error on : dir2.RefreshCache();
I am not sure, what I am doing wrong. I have tried with different LDAP values like :-
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://ldap.google.com/DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))
using (DirectoryEntry dir2 = new DirectoryEntry("LDAP:///DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))using (DirectoryEntry dir2 = new DirectoryEntry("LDAP://DC=www,DC=google,DC=com", null, null, AuthenticationTypes.Encryption))But nothing really helped me.
Enclosed please find the stack trace:
COMException (0x8007203a): The server is not operational.
I have tried to follow the enclosed link as well but no help:
http://msdn.microsoft.com/en-us/library/bb384378.aspx
I am working on Windows Server 2003 and trying to connect Exchange 2007.
Any help or suggestion would be greatly appreciated.
Thanks in advance !!
Ratika
0 Points
5 Posts
Re: Issue with LPAD and gives error The server is not operational
Nov 26, 2012 03:15 PM|LINK
Hi,
This issue has been resolved.
I thought to share for others.
The issue was with wrong AD name. Please check with IT or Administrator if you are using correct Active directory name.
Cheers!!
Angie xu - M...
All-Star
20270 Points
1727 Posts
Microsoft
Re: Issue with LPAD and gives error The server is not operational
Nov 27, 2012 12:07 AM|LINK
Hi Ratika
Glad that you've solved your problem by yourself and I come here to confirm and close the issue.
Kind regards
Feedback to us
Develop and promote your apps in Windows Store