DirectoryEntry FindOne local SAM

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
 
M

Marc Scheuner

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
 

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

Top