Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active directory ..

Status
Not open for further replies.

sribu

Programmer
Mar 8, 2003
17
US
Hi,

I am trying to authenticate users against Active Directory using System.Directory Services.Below is the code I am using:

Dim Entry As DirectoryEntry
Dim obj As Object
Dim result As SearchResult
Try
Entry = New DirectoryEntry("LDAP://" & path)
obj = Entry.NativeObject
Catch ex As Exception
MessageBox.Show("The specified location " & Chr(34) & Me.txtLocation.Text & Chr(34) & _
" could not be found. Please ensure that you typed the location correctly." & _
"", "", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Exit Function
End Try

When I say Entry.NativeObject, I am getting an exception which says:
"ActiveDirectory client is not installed on this system."
My operating system is Windows XP Professional and should not need installation of Active Directory client.

Any help will be greatly appreciated.

 
Is your machine a member of an Active Directory domain?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Yes it is. I checked with my administrator.

Thanks,
sribu
 
MSDN has this to say about the NativeObject property:
MSDN said:
This object is for advanced scenarios that cannot be accomplished with the System.DirectoryServices classes alone. To use it, you need to import one of the IADs-family COM interfaces and then cast this property to that interface.

Assuming your LDAP path points to the user object, is there a reason why you aren't using the Properties collection to look at it's contents?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top