Pages

Men

rh

7/06/2012

What is IExtensibleDataObject in WCF

What is IExtensibleDataObject?
OR
What is the advantage and disadvantage of implementing IExtensibleDataObject?

WCF guidelines recommend enhancing all data contracts with support of IExtensibleDataObject interface, to preserve unexpected data from clients. During deserialization, superfluous data is placed in a dictionary on the service side and during serialization, the same data is written as XML as it was originally provided by the client. This is very useful to preserve data from version 2.0 services at a version 1.0 client. It is also useful in case where downstream calls from version 2.0 services go to other services handling version 1.0.
However, there is also a disadvantage of implementing IExtensibleDataObject. It carries risks of denial of service (DoS) and unnecessary use of server resources.

We can turn on and off, the support for IExtensibleDataObject either in code declaratively using attributes or in the configuration file as shown below.

No comments :

Post a Comment