Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Directory (LDAP) search error 0x8007203A

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Harald - 21 Sep 2006 14:21 GMT
Hi,
I'm trying to read some data with C# in .NET 2.0. I'm using the Directory
classes as follows:

   ...
   DirectoryEntry entry = new DirectoryEntry();

   entry.Path =
"LDAP://myServer.intern.myCompany.de:51000/ou=MyApplication,ou=srv,o=myCompany";
   entry.Username = LDAP_APP_USER;
   entry.Password = LDAP_APP_USER_PSWRD;

   DirectorySearcher            searcher = new DirectorySearcher(entry,
myFilter);
   SearchResultCollection    results = searcher.FindAll();

   foreach(SearchResult result in results)
       ...

   results.Dispose();
   ...

The values for Username, Password and Path (and myFilter) are correct and
access works fine within other acess software like Jxplorer. But here,
unfortunately the call "searcher.FindAll()" throws a
System.Runtime.InteropServices.COMException:

"0x8007203A: The server is not operational".
(Translated English version, we use VS2005 German)

I have no idea what to do! Thx for your appreciated help!

- Harald
Marc Scheuner - 21 Sep 2006 21:35 GMT
>I'm trying to read some data with C# in .NET 2.0. I'm using the Directory
>classes as follows:

>    DirectoryEntry entry = new DirectoryEntry();
>    entry.Path =
[quoted text clipped - 11 lines]
>"0x8007203A: The server is not operational".
>(Translated English version, we use VS2005 German)

I would suspect that the LDAP path is invalid / incomplete. In most
cases, it should AT LEAST also contain some dc= elements, something
like

LDAP://myServer.intern.mycompany.de/ou=MyApplication,ou=SRV,dc=MyCompany,dc=de

Also, I am uncertain if the port 51000 that you seem to specify here
is valid and will work.

Another suspicion I have is that you're trying to use the
DirectorySearcher against an LDAP store which is not really Active
Directory - that won't work, in most cases, I'm afraid. It seems that
while DirectoryEntry per se is fairly "portable" across LDAP
implementations, DirectoySearcher often is not.

Marc
Harald - 22 Sep 2006 12:23 GMT
Hi Marc,
as I stated - the path works and the port number is also not the matter of
concern because it all also works in jXplorer. But you are right that the
connected server is a sun machine and not a microsoft server. Is it true
that DirectorySearcher doesn't work in such cases??? And if yes - how to
make LDAP calls to such servers in .net 2.0 ???

Best regards, Harald

> >I'm trying to read some data with C# in .NET 2.0. I'm using the Directory
>>classes as follows:
[quoted text clipped - 31 lines]
>
> Marc
Marc Scheuner - 22 Sep 2006 20:50 GMT
>But you are right that the  connected server is a sun machine and not a microsoft server. Is it true
>that DirectorySearcher doesn't work in such cases??? And if yes - how to make LDAP
>calls to such servers in .net 2.0 ???

DirectorySEarcher has a lot more problems when hitting non-AD servers.
What you could do is use the native LDAP calls in .NET 2.0, which are
located in the System.DirectoryServices.Protocols namespace - they
should work against any LDAP standard-compliant server, but they are
often less easy and "nice" to use.

Marc
Harald - 26 Sep 2006 10:04 GMT
Hi Marc,
thanks for your tipp with the protocols namespace. I'll try that way...
- Harald
Harald - 29 Sep 2006 13:29 GMT
Hi,
my problems seem to be caused by a 1) wrong port number and by 2) an expired
SSL certificate. Examination lead to an better understanding of LDAP. Thanks
for all answers!
- Harald

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.