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

此用户昵称已被屏蔽 2013-06-08 03:32:35
客户端连接到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.


求其中原理
...全文
1534 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
已找到原因了,还是谢谢ls两位
moonwrite 2013-06-08
  • 打赏
  • 举报
回复
客户端是否一开始有安装.net 3.0以上~ 安装了vs后 对程序运行的影响就是有多了运行时的环境~
EnForGrass 2013-06-08
  • 打赏
  • 举报
回复
很明确啊,'System.Threading.Tasks.Task`1[MANDALAT.RMC.SDK.AppResponse]' 不能够序列化, 实现一个类可序列化的最简便的方法就是增加Serializable属性标记类。 [Serializable()] public class MEABlock { 。。。。 }

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧