Bill
2005-11-11 21:12:44 UTC
Is it possible to search through user accounts on a machine that is not part
of a Windows Domain? I thought this should be possible using
WinNT://MyComputerName as the ADsPath string.
The end result from the FindOne() function is an exception with the message:
"The provider does not support searching and cannot search
WinNT://MyComputerName."
Here is the the code snipet in VB.NET:
dirEntry = New DirectoryEntry("WINNT://myComputerName", "aUserName", "pwd",
AuthenticationTypes.Secure)
dirSearcher = New DirectorySearcher(dirEntry)
dirSearcher.Filter = "(sSamAccountName=myName)"
searchResult = dirSearcher.FindOne()
FindOne() fails with the above mentioned message.
Any help with this is greatly appreciated.
of a Windows Domain? I thought this should be possible using
WinNT://MyComputerName as the ADsPath string.
The end result from the FindOne() function is an exception with the message:
"The provider does not support searching and cannot search
WinNT://MyComputerName."
Here is the the code snipet in VB.NET:
dirEntry = New DirectoryEntry("WINNT://myComputerName", "aUserName", "pwd",
AuthenticationTypes.Secure)
dirSearcher = New DirectorySearcher(dirEntry)
dirSearcher.Filter = "(sSamAccountName=myName)"
searchResult = dirSearcher.FindOne()
FindOne() fails with the above mentioned message.
Any help with this is greatly appreciated.