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 / January 2006

Tip: Looking for answers? Try searching our database.

Query Domain API ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xenophon - 04 Jan 2006 17:29 GMT
I have C# 1.1 code that queries a domain controller for groups and etc
with LDAP queries. The works fine until the DC is down for any reason.
There are many DCs in the domain (win 2003 native). I would like to
relpace my single-computer query code. I would like to do something
that queries "the domain" instead of "the domain controller".

Is there an API call that will help me here?

Thanks.
Willy Denoyette [MVP] - 04 Jan 2006 18:18 GMT
> I have C# 1.1 code that queries a domain controller for groups and etc
> with LDAP queries. The works fine until the DC is down for any reason.
[quoted text clipped - 5 lines]
>
> Thanks.

That means that you are binding against a DC (using the server name), you
should bind against the root of the domain (RootDSE).

Willy.
"Yuan Ren[MSFT]" - 05 Jan 2006 10:05 GMT
Hi,

Welcome to MSDN newsgroup!

Let me explain my understanding for your issue: you want the LDAP query
runs well when one DC has been down in the current domain environment. If I
have misunderstood anything, please let me know.

In this scenario, I think remove "dc=" in your LDAP clause is a good way
because the client will bind to the DC automatically with it.

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.

Yuan Ren [MSFT]
Microsoft Online Support
Willy Denoyette [MVP] - 05 Jan 2006 13:14 GMT
> Hi,
>
[quoted text clipped - 13 lines]
> Yuan Ren [MSFT]
> Microsoft Online Support

Yuan,

Doing so will bind to the current logon server(DC), so if this DC goes down
after the logon the same thing will happen.
IMO the only way to solve this issue is to bind to the root (using RootDSE),
if you really need to, you can get a list of available DC's from the root
and try to use a server bind against one of them.

Willy.
xenophon - 05 Jan 2006 14:57 GMT
Yuan, you have misunderstood me completely. I did not want to query a
single domain controller with "dc=", because I am already doing that.
I wanted to query *any* domain controller. It appears that I need to
use the "rootdse" space.

Thanks.

>Hi,
>
[quoted text clipped - 12 lines]
>Yuan Ren [MSFT]
>Microsoft Online Support
"Yuan Ren[MSFT]" - 06 Jan 2006 06:29 GMT
Hi,

Sorry for misunderstanding!

Willy's suggestion seems wonderful! RootDSE is suitable for this scenario.
Actually, I'm glad to hear your problem has been resolved! If you have any
issues or concerns in the future, please let me know. I will be happy to be
of further assistance.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

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.