Hi
I'm building ECMA 2.1 agents and a stumbled on a problem. In earlier builds of R2 SP1 like 4.1.3114 you would get a NoSuchAttributeInObjectTypeException if you tried to call csentry.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("ATTRNAME","ATTRVALUE")); on an attribute retrieved from the datasource that doesn't exists in the MA or is not seleted. This seems to have been changed in build 4.1.3508? I recently upgraded my testenvironment and a customers environment and after that upgrade I no longer get this NoSuchAttributeInObjectTypeException. Instead I am allowed to add this attribute and it's value to the csentry, but when the syncengine continues to process this further I get this exception:
The server encountered an unexpected error while performing an operation for a management agent.
"Microsoft.MetadirectoryServices.NoSuchAttributeInObjectTypeException: Attribute "HiddenFromAddressListsEnabled" is not usable with the object type in question.
at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.AddAttributeToDImage(CDImage* pdimage, String attributeName, AttributeModificationType attributeModificationType, IList`1 attributeValueChanges, Int32 escapeReferenceDNValues)
So now I have no possibility to handle this.....
Does anyone have any thoughts or insight on this? Is this a bug or is there a reason for changing this behavour? How should we handle this scenario in ECMA code? Even if I would search the schema I have no way of determine if an attribute is selected, or is there?
Regards
Patrik