Microsoft KB Archive/899114

= The DirectorySearcher class throws an exception when you use the FindOne function or the FindAll function to call an object that has the sIDHistory attribute =

Article ID: 899114

Article Last Modified on 11/16/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.0

-





SYMPTOMS
When the FindOne function or the FindAll function of the DirectorySearcher class calls an object that has the sidHistory attribute, the DirectorySearcher class throws the following exception:

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: Byte array for GUID must be exactly 16 bytes long.



WORKAROUND
To work around this problem, set the following properties before you use the FindOne function or the FindAll function: dsr.PropertyNamesOnly = True dsr.PropertiesToLoad.Add(&quot;samAccountName&quot;) Note In this code, dsr is an instance of the DirectorySearcher class.



STATUS
This problem was corrected in the Microsoft .NET Framework 1.1.

