I have WCF restful service and have property called Image with Imageclass
[DataMember]
public Image Image { get; set; }
and getting the below error when trying to call the method having a object with above property
System.Runtime.Serialization.SerializationException: Type ‘System.Drawing.Bitmap’ with data contract name ‘Bitmap:http://schemas.datacontract.org/2004/07/System.Drawing‘ is not expected. Add any types not known statically to the list of known types – for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.
The error pretty much tells you how to solve the problem: add
System.Drawing.Bitmapas a known type on the contract: