首页 > 代码库 > WCF中DataContract用IEnumerable 类型导致传输错误
WCF中DataContract用IEnumerable 类型导致传输错误
错误信息如下:
"An error occurred while receiving the HTTP response to http://127.0.0.1/PlugInService_PMFDataService/PMFDataService. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."
本以为是传输大小超过限制 ,修改其maxReceivedMessageSize后,未果。
经google发现原来不能用IEnumerable 返回数据,应该采用List<>返回
WCF中DataContract用IEnumerable 类型导致传输错误
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。