.NET System.DirectoryServices question
- From: "JR" <jr@xxxxxxxxxxx>
- Date: Thu, 8 Sep 2005 08:11:57 -0500
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
.
- Follow-Ups:
- Re: .NET System.DirectoryServices question
- From: Oleg Ogurok
- Re: .NET System.DirectoryServices question
- Prev by Date: Re: Lost Cookie during Authentication
- Next by Date: RE: Security - It Doesn't Seem Possible?
- Previous by thread: VB WinAPI - Detect windows open and closes applications
- Next by thread: Re: .NET System.DirectoryServices question
- Index(es):
Relevant Pages
|