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 (899114)
The information in this article applies to:
- Microsoft .NET Framework 1.0
SYMPTOMSWhen 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. WORKAROUNDTo work around this problem, set the
following properties before you use the FindOne() function or the FindAll() function: dsr.PropertyNamesOnly = True
dsr.PropertiesToLoad.Add("samAccountName")
Note In this code, dsr is an instance of the DirectorySearcher class. STATUS
This problem was corrected in the Microsoft .NET Framework 1.1.
REFERENCES
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
818031
FIX: Adding group memberships by using the System.DirectoryServices namespace can truncate group members
For more information about the sIDHistory attribute, visit the
following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 8/22/2005 |
---|
Keywords: | kbActiveDirectory kberrmsg kbtshoot kbprb kbcode KB899114 kbAudDeveloper |
---|
|