CallbackBehaviorAttribute.IgnoreExtensionDataObject Property

Gets or sets a value that specifies whether to send unknown serialization data onto the wire.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public bool IgnoreExtensionDataObject { get; set; }

Property Value

Type: System.Boolean
true if unknown serialization data is never sent; otherwise, false. The default is false.

If a type implements the IExtensibleDataObject interface, it stores any extra data it does not know about that comes over the wire when deserializing into that type. For example, if a type Person has members FirstName and LastName, and an element called PhoneNumber comes in, it is stored. When later serializing the type, PhoneNumber is re-emitted. The problem is that the schema for Person exported by that service only has FirstName and LastName, so Windows Communication Foundation (WCF) generates a schema-invalid instance. If strict schema compliance is important, you can set IgnoreExtensionDataObject to true to turn this re-emitting behavior off.

Regardless of the IgnoreExtensionDataObject setting, WCF always processes known data (both in and out) and does not throw exceptions when extra data comes in.

You can use the <callbackDebug> element to set this property in a client application configuration file.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft