473,320 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to Determine which DC answers LDAP Query

Hello,
Is there any way to determine which server answers an LDAP query? One that is not directed at a particular server that is.

ie.

DirectoryEntry oUser=new DirectoryEntry("LDAP://Domain/DC=Domain,DC=COM","","",AuthenticationTypes.Secure );

Thanks,
Bob

--------------------------------
From: Robert Bryan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>gtoK6tnZIEaH0AcxF53xkw==</Id>
Nov 16 '05 #1
2 8089
Hi,

I'm not sure there is. If you need to know the server you're connected to,
you might want to do it the way I do:

connect to LDAP://DOMAIN/rootDSE (or LDAP://rootDSE if the computer is in
the domain you're contacting) and read the dnsHostName property. That will
give you the name of the server that answered the request, then use that
servername for the other requests. The rootDSE is also the object that will
give you the namingContexts that are available.
Arild

"Robert Bryan via .NET 247" <an*******@dotnet247.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Hello,
Is there any way to determine which server answers an LDAP query? One that is not directed at a particular server that is.
ie.

DirectoryEntry oUser=new DirectoryEntry("LDAP://Domain/DC=Domain,DC=COM","","",AuthenticationTypes.Se
cure);
Thanks,
Bob

--------------------------------
From: Robert Bryan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>gtoK6tnZIEaH0AcxF53xkw==</Id>

Nov 16 '05 #2
Hi,

I'm not sure there is. If you need to know the server you're connected to,
you might want to do it the way I do:

connect to LDAP://DOMAIN/rootDSE (or LDAP://rootDSE if the computer is in
the domain you're contacting) and read the dnsHostName property. That will
give you the name of the server that answered the request, then use that
servername for the other requests. The rootDSE is also the object that will
give you the namingContexts that are available.
Arild

"Robert Bryan via .NET 247" <an*******@dotnet247.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Hello,
Is there any way to determine which server answers an LDAP query? One that is not directed at a particular server that is.
ie.

DirectoryEntry oUser=new DirectoryEntry("LDAP://Domain/DC=Domain,DC=COM","","",AuthenticationTypes.Se
cure);
Thanks,
Bob

--------------------------------
From: Robert Bryan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>gtoK6tnZIEaH0AcxF53xkw==</Id>

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jeremy | last post by:
Hello. I have an asp.net application that resides on a non-DC / BDC Sharepoint Server (although it is logged into the domain). The application will perform lookups based on the current user...
0
by: Robert Bryan via .NET 247 | last post by:
Hello, Is there any way to determine which server answers an LDAP query? One that is not directed at a particular server that is. ie. DirectoryEntry oUser=new...
3
by: Jay | last post by:
I have a simple LDAP query (grabs all users from a particular AD group and populates a checkboxlist) that works perfectly fine on the development machine logged on locally as any user. When I...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
3
by: Chad Beckner | last post by:
I am starting to translate some code from ASP to ASP.NET (VB). I was able to query ADS to get a users groups that they belong to, and also query a group and get a list of users. However, I can't...
5
by: Bryan | last post by:
Hello, I have a asp.net app working with directory services on my Windows XP development machine. However when I moved the application over to our production server (Win 2000 Server) it no longer...
4
by: h2so4 | last post by:
I want to write a program that will query an ldap directory. can I use adsi or ado to do that, If yes how ? tx -- h2so4
0
by: Gerry Sinkiewicz | last post by:
Looking for a bit of software that will accept an LDAP query via port 389 and convert it to an SQL query and return the results to the originating LDAP client. Basically a dialect converter LDAP...
3
by: RJN | last post by:
Hi I've written a code that queries Windows LDAP server and works fine, but the same doesn't work when querying Solaris LDAP server. DirectoryEntry de = new...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.