Active Directory Client has not been installed on this computer

K

Kenneth Keeley

Hi,
I have been working on a Login page that uses ADSI to authenicate the
users. I had this all working on my test system and on a second system
connected to the live domain. Now it will only work on my test system which
is a win2K Server running as a domain controller and web server. The second
system is a win2K workstation connected to the live win2K domain controller,
This computer was able to run the code in the past and now all I keep
getting is "Active Directory Client has not been installed on this
computer".

The code I am using looks like this.

try
{
// Create Active Directory Object.
DirectoryEntry AdsiEntry = new DirectoryEntry(_AdPath, _Domain + @"\" +
_AdminUserName, _AdminPassword);

// Create an Active Directory Search.
DirectorySearcher AdsiSearch = new DirectorySearcher(AdsiEntry);

// Find UserName in Active Directory.
AdsiSearch.Filter = "(SAMAccountName=" + UserName + ")";
AdsiSearch.PropertiesToLoad.Add("cn");
SearchResult Result = AdsiSearch.FindOne();

if(Result == null)
{
// UserName was not Found.
return false;
}

// Update FullName.
_UserName = UserName;
_UserPath = Result.Path;

The problem occurs at the "SearchResult Result = AdsiSearch.FindOne();" Line
of code. all the other lines seem to work fine.

Can somebody help.
Kenneth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top