.NET System.DirectoryServices question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I am trying to see if someone has typed in the domain name properly in an
application using the following code:

strPath = "LDAP://"; + domainName

If DirectoryEntry.Exists(strPath) = False Then

Throw (New Exception("The Windows Domain named " + domainName + " does
not exist"))

If the domain name is incorrect, the DirectoryEntry.Exists call takes a LONG
time to return and throws an exception with the message "The server is not
operational"

Is there a better way to determine if the domain name is correct?

Thanks.

-jr



.



Relevant Pages

  • .NET System.DirectoryServices question
    ... If the domain name is incorrect, the DirectoryEntry.Exists call takes a LONG ... time to return and throws an exception with the message "The server is not ... Prev by Date: ...
    (microsoft.public.win2000.active_directory)
  • Re: Installation Hangs via RIS
    ... Check your antivirus on your server. ... Set an exception to not scan on ... read the directory where all your images are stored. ... Prev by Date: ...
    (microsoft.public.windows.server.general)
  • Re: problem with adding attachment to mail
    ... I did get an exception when I was trying to set the afz ... Do you know if your server is ... programmed to strip the attachment? ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: returning BSTR to VBSCript
    ... which it gives in the Error Lookup "The server threw an exception. ... Sada ... Prev by Date: ...
    (microsoft.public.vc.atl)
  • Re: DsBindWithSpnExW error 0x6ba
    ... > connect to server 127.0.0.1:389 ... > it says the parameter is incorrect. ... Lee Flight ... Prev by Date: ...
    (microsoft.public.windows.server.active_directory)