March 10th, 2009, 10:25 PM
[Serializable] ---> seems like [IgnoreDataMember] was ignored by WCF?
I'm using [Serializable] for my class (i.e. not labeled wih [DataContract] ---> seems like [IgnoreDataMember] is ignored?
[Serializable] *** Not [DataContract]
public class A : ISerializable
I called service which return A. The reason why I think IgnoreDataMember was not applied is because from SvcTraceViewer I get this message:
[[System.String, mscorlib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' with data contract name 'ArrayOfstring:http://schemas.microsoft.com/2003/10...ization/Arrays' 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.
I need to "Ignore" the property and I've tried "IgnoreDataMember" as well as "XmlIgnore", can't get pass this. Is it because [KnownType("GetKnownType")] attribute is also ignored when you use [Serializable] instead of [DataContract] attribute?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!