Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF ignore data contract not working
    primarykey
    data
    text
    <p>I have a WCF Service hosted on IIS. Here is my Interface:</p> <pre><code>[ServiceContract] [SilverlightFaultBehavior] public interface IETC { [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = "XYZ")] string GetStampXML(); [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = "XYZ")] List&lt;Stamp&gt; GetStamps(); } </code></pre> <p>I am getting an error when I go to my WCF service through the web browser. The error is as follows:</p> <pre><code>Type 'System.Windows.Media.ImageSource' cannot be serialized. Consider marking it with the DataContractAttribute attribute..... </code></pre> <p>My stamps Class is:</p> <pre><code>[DataContract] public class Stamp { private string _Name; private string _SmallIcon = ""; private string _MediumIcon = ""; private string _LargeIcon = ""; private BitmapImage _SmallImage; private BitmapImage _MediumImage; private BitmapImage _LargeImage; [DataMember] public string Name { get { return _Name; } set { _Name = value; } } [DataMember] public string SmallIcon { get { return _SmallIcon; } set { _SmallIcon = value; } } [DataMember] public string MediumIcon { get { return _MediumIcon; } set { _MediumIcon = value; } } [DataMember] public string LargeIcon { get { return _LargeIcon; } set { _LargeIcon = value; } } [IgnoreDataMember] public BitmapImage SmallImage { get { return _SmallImage; } set { _SmallImage = value; } } [IgnoreDataMember] public BitmapImage MediumImage { get { return _MediumImage; } set { _MediumImage = value; } } [IgnoreDataMember] public BitmapImage LargeImage { get { return _LargeImage; } set { _LargeImage = value; } } } </code></pre> <p>It is like the IgnoreDataMember is not being recognized. I tried it without the IgnoreDataMember figure it was going to only serialize the DataMembers, and that didn't work either. Any ideas why it seems to trying to serialize the BitmapImage?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload