DirectoryEntry FindOne local SAM

  • Thread starter Thread starter Brian Stoop
  • Start date Start date
B

Brian Stoop

Hi,

I want to authenticate a user and their password in the local SAM (Windows
2003 Server).

I am running as the Built in Admiistrator account.

My code looks like this:

DirectoryEntry dsDirectoryEntry = new DirectoryEntry("WinNT://" +
MACHINENAME, userID, password);
DirectorySearcher dsSearch = new DirectorySearcher(dsDirectoryEntry);
SearchResult dsResults = dsSearch.FindOne();

But every time I get the exception: "The provider does not support searching
and cannot search"


Does the local SAM support DirectoryEntry Enumeration ? Or is it only
available with Active Directory ?


thanks, B
 
But every time I get the exception: "The provider does not support searching
and cannot search"

Does the local SAM support DirectoryEntry Enumeration ? Or is it only
available with Active Directory ?

As the error message clearly states: the local SAM (WinNT: provider)
does *not* support searching using the DirectorySearcher. You'll need
to find another way to accomplish what you're trying to do.

Marc
 
Back
Top