Unexpected behavior may occur when you use the System.DirectoryServices namespace with the .NET Framework 1.1 SP1 and the .NET Framework 1.0 SP3 (886541)
The information in this article applies to:
- Microsoft Windows Server 2003, Datacenter Edition
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows Server 2003, Standard Edition
- Microsoft Windows Server 2003, Web Edition
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Datacenter Server
- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server
- Microsoft Windows XP 64-Bit Edition
- Microsoft Windows XP Professional
- Microsoft .NET Framework 1.0
SYMPTOMSIf you have installed the Microsoft .NET Framework 1.1 Service Pack 1 (SP1) or the .NET Framework 1.0 Service Pack 3 (SP3), you may receive error messages or experience unexpected behavior when you use the System.DirectoryServices namespace.
These errors may occur when you perform different types of operations on PropertyValueCollection class can generate these errors. For example, you may receive one of the following error messages: Error message 1Operation is not valid due to the current state of the object. Error message 2An unhandled exception of type System.InvalidOperationException' occurred in mscorlib.dll. Error message 3 80004005 - Unknown Error Error message 3 occurs when the credentials in a DirectoryEntry are authenticated, typically on a RefreshCache operation. For example: DirectoryEntry de = new DirectoryEntry(sLDAP, sUsername, sPassword, AuthenticationTypes.Secure);de.RefreshCache(); Error message 4Not Implemented You may recieve error message 4 during a bind operation. Notice that the bind connection will not occur until an operation is performed. If a RefreshCache method operation is not performed, the failure may occur later in the code. For example, the failure may occur during a FindAll method operation. DirectoryEntry de = new DirectoryEntry(strLDAP);
// Bind not performed yet
DirectorySearcher mySearcher = new DirectorySearcher(de);
//the bind has not occured yet - but will happen when the next line executes
// this line could generate the error Not Implemented
SearchResultCollection result = mySearcher.FindAll(); RESOLUTIONTo resolve this problem, you must apply hotfix 835763. Hotfix 835763 is a prerequisite for the .NET Framework 1.1 SP1 and the .NET Framework 1.0 SP3. This hotfix is part of Microsoft Windows XP Service Pack 2 (SP2) and Microsoft Windows Server 2003 Service Pack 1 (SP1). Earlier versions of these operating systems require this hotfix. For example, Microsoft Windows 2000 Service Pack 4 (SP4), Windows Server 2003, and Windows XP SP1 require this hotfix. The classes in the System.DirectoryServices namespace wrap ADSI functionality. The System.DirectoryServices namespace needs the new functionality to exist in the underlying ADSI technology that hotfix 835763 provides.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
835763
IADs::Put/PutEx or IADsPropertyList::PutPropertyItem calls may not accumulate
Because hotfix 835763 updates the underlying ADSI objects, you can install this hotfix either before or after you install the .NET Framework 1.0 SP3 or the .NET Framework 1.1 SP1. REFERENCESFor more information about the way that the System.DirectoryServices namespace is layered on ADSI, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/13/2005 |
---|
Keywords: | kbprb KB886541 kbAudDeveloper |
---|
|