public  class EMMPBaseMsg
{ public String Data { get; set; } public DateTime AddTime { get; set; } public long Id { get; set; } public String HandleType { get; set; }
} public class EMMPResponse
{
public EMMPResponse()
{
Model = new List<EMMPResponseMsg>();
}
public int Code { get; set; }
public String Msg { get; set; }
public List<EMMPResponseMsg> Model
{
get;
set;
}
} public class EMMPResponse
{
public EMMPResponse()
{
Model = new List<EMMPResponseMsg>();
}
public int Code { get; set; }
public String Msg { get; set; } public List<EMMPResponseMsg> Model
{
get;
set;
}
}

将上面EMMPResponse的 List<EMMPResponseMsg>改成 //将List<EMMPBaseMsg>后

用户调用WCF接口时返回的response中,

response.Model.Add(new EMMPResponseMsg(){}); 时 会报服务错误,基础链接被关闭

但是调试wcf接口实现代码时是正确的,因为错误发生在WCF基础框架序列化时

解决,就是按声明的类型往Model集合里添加该类型数据

最新文章

  1. 用JWT来保护我们的ASP.NET Core Web API
  2. div各种距离 详细解释图
  3. Android--Retrofit的简单使用(一)
  4. HDU 3829 - Cat VS Dog (二分图最大独立集)
  5. Spring笔记——Spring+JDBC组合开发
  6. asp.net web api内部培训资料
  7. C#中MessageBox使用方法大全(附效果图)
  8. UIScrollView 与 UIPageView 的联合使用
  9. Clojure学习02:语法
  10. Html 定位position
  11. 201521123039《Java程序设计》第十三周学习总结
  12. Fiddler系列教程3:使用Fiddler录制Jmeter性能测试脚本
  13. SUSE-11 本地 zypper 配置
  14. select,poll,epoll
  15. Django--bug--__init__() got an unexpected keyword argument &#39;qnique&#39;
  16. 文字超长隐藏为...ie7不兼容的解决办法
  17. Go语言 数据类型,流程控制
  18. hexo d 报错‘fatal: could not read Username for &#39;https://github.com&#39;: No error’
  19. 团队冲刺——Four
  20. Python笔记 #11# 统计图定制化

热门文章

  1. C语言之栈区、堆区
  2. The following packages have unmet dependencies错误
  3. UVa 548 Tree(二叉树最短路径)
  4. jQuery跳转到页面指定位置
  5. PARAMETERS 指令
  6. YII2中添加自定义模块
  7. git 远程仓库与本地项目关联
  8. DOM系列基础知识
  9. win7系统 无线上网卡 共享网络,设置成wifi热点
  10. vxlan vs GRE(三层组播和二层组播如何对应起来)