Microsoft KB Archive/894277

= You receive an &quot;error 8007200D - The specified directory service attribute or value already exists&quot; error message when you use the System.DirectoryServices namespace Add method to update multi-value attributes in Windows 2000 Server =

Article ID: 894277

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.1 Service Pack 1
 * Microsoft .NET Framework 1.0 Service Pack 3

-





SYMPTOMS
When you use the System.DirectoryServices namespace Add method to set more than one property on a multi-value attribute, you receive the following error message:

error 8007200D - The specified directory service attribute or value already exists.

This problem occurs after you install the Microsoft .NET Framework 1.0 Service Pack 3 (SP3) or the .NET Framework 1.1 SP1 and you try to create a new object in a Microsoft Windows 2000 Server domain.

Note This problem does not occur in a Microsoft Windows Server 2003 domain.



CAUSE
In the .NET Framework 1.0 SP3 and in the .NET Framework 1.1 SP1, the property cache behavior has changed to correct a security issue. Operations that were previously written to the property cache are now sent to the domain controller. In Windows Server 2003, Active Directory has been updated to process these operations correctly.



WORKAROUND
To work around this problem, use the Value method instead of the Add method. For example, the following Microsoft Visual C# code example uses the Add method. DirectoryEntry root = new DirectoryEntry(&quot;LDAP:// /dc= ,dc=&quot;); DirectoryEntry user = root.Children.Add(&quot;CN=&quot;,&quot;user&quot;); user.Properties[].Add(&quot;test1&quot;); user.Properties[].Add(&quot;test2&quot;); If you have code that is similar to this example, you should replace the Add methods with the following code: user.Properties[strProperty].Value = new string[]{&quot;test1&quot;, &quot;test2&quot;}; Note There is an exception. If you are setting an attribute of type octet string or binary, you will not be able to use the Value method workaround. You will continue to use the Add method.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information about the System.DirectoryServices namespace, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/system.directoryservices(vs.71).aspx

Additional query words: LDAP

Keywords: kbactivedirectory kbnofix kbbug kbtshoot kbprb KB894277

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.