当前位置:编程学习 > C#/ASP.NET >>

连接WCF服务出错。。。。!!!!!!!!!!!!!!!!!!

客户端连接到WCF服务时总是报错:但安装了vs2012后就正常了 


'System.Threading.Tasks.Task`1[MANDALAT.RMC.SDK.AppResponse]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.  If the type is a collection, consider marking it with the CollectionDataContractAttribute.  See the Microsoft .NET Framework documentation for other supported types.


求其中原理 WCF  .NET Visual Studio 2012 --------------------编程问答-------------------- 很明确啊,'System.Threading.Tasks.Task`1[MANDALAT.RMC.SDK.AppResponse]' 不能够序列化,
实现一个类可序列化的最简便的方法就是增加Serializable属性标记类。
[Serializable()]  
public class MEABlock  
{
 。。。。  
} --------------------编程问答-------------------- 客户端是否一开始有安装.net 3.0以上~
安装了vs后 对程序运行的影响就是有多了运行时的环境~
--------------------编程问答-------------------- 已找到原因了,还是谢谢ls两位
补充:.NET技术 ,  Web Services
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,