wcf rest服务中的序列化问题

时间:2014-12-08 08:40:39

标签: entity-framework wcf-rest

参考我之前的问题

Return a list of objects from a restful WCF service

我启用了trace,我正在解决以下异常问题。我不知道这个例外是什么。请帮忙。

System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

消息:

Type 'System.Data.Entity.DynamicProxies.course_4B21E9E950AEFDC2233FE771C1BFE0ABF63D591A6487C93CBD145965FB96EA11' with data contract name 'course_4B21E9E950AEFDC2233FE771C1BFE0ABF63D591A6487C93CBD145965FB96EA11:http://schemas.datacontract.org/2004/07/System.Data.Entity.DynamicProxies' is not expected. Consider using a DataContractResolver or 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.

0 个答案:

没有答案