I have tried using something like this and it seems to work, but not
sure if it is the best (and fastest) way to do it:
DirectoryContext ctx = new DirectoryContext(DirectoryContextType.Domain,
"domain", "user", "password");
Domain domain = Domain.GetDomain(ctx);
DomainController dc = domain.FindDomainController();
dc.Name contains name of dc.
Does FindDomainController working like how Windows will locate a dc?
Should I use LocatorOption.ForceRediscovery?
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
"Magnusb" <mag...@sbbs.se> wrote in message
news:MPG.2595cea08...@msnews.microsoft.com...
> .
>
"Joe Kaplan" wrote:
> .
>