Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wcf 服务引用返回值大小问题_Wcf_Web Services_Reflection - Fatal编程技术网

Wcf 服务引用返回值大小问题

Wcf 服务引用返回值大小问题,wcf,web-services,reflection,Wcf,Web Services,Reflection,我有一个Web服务方法,它返回对象列表list 当列表的长度大约为9000个对象时,服务会很好地返回此列表,但当长度大约为12000个或更多对象时,服务会返回一个错误: 基础连接已关闭:连接意外关闭 `System.Reflection.TargetInvocationException:调用的目标已引发异常。-->Microsoft.FSharp.Core.FailureException:System.Net.WebException:基础连接已关闭:连接意外关闭。 在System.Net.

我有一个Web服务方法,它返回对象列表
list

当列表的长度大约为9000个对象时,服务会很好地返回此列表,但当长度大约为12000个或更多对象时,服务会返回一个错误:

基础连接已关闭:连接意外关闭

`System.Reflection.TargetInvocationException:调用的目标已引发异常。-->Microsoft.FSharp.Core.FailureException:System.Net.WebException:基础连接已关闭:连接意外关闭。 在System.Net.HttpWebRequest.GetResponse()中 在.$Type.httprequest。webRespBase@162@162(删除TTPREQ)x@162,单位) 在.$Type.httprequest。webRespBase@162@162(删除TTPREQ)x@162,单位) 在Storm.Types.WebHttp.DelegatingHttpReq.GetResponse()处 在System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest请求)中 位于System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest请求) 位于System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object[]参数) 在ServiceLogic.LoadRestriccionCanalPlano(字符串CodRuta,字符串CodTipoRuta)

---内部异常堆栈跟踪的结束---

在System.RuntimeMethodHandle.\u InvokeMethodFast(对象目标、对象[]参数、SignatureStruct&sig、MethodAttributes方法属性、RuntimeTypeHandle类型所有者) 在System.Reflection.RuntimeMethodInfo.Invoke(对象obj、BindingFlags invokeAttr、绑定器绑定器、对象[]参数、CultureInfo区域性、布尔skipVisibilityChecks) 在System.Reflection.RuntimeMethodInfo.Invoke(对象obj、BindingFlags invokeAttr、绑定器绑定器、对象[]参数、CultureInfo区域性) 在Storm.UI.Forms.FormMainOps。clo@651.Invoke(对象[]methodParams@41) 在.$Type.bgworker。run@51@57_2.调用(DoWorkEventArgs dArgs) 在.$Type.bgworker。run@51@57_1.调用(对象发送方,DoWorkEventArgs e) 位于System.ComponentModel.BackgroundWorker.WorkerThreadStart(对象参数)`

我已尝试更改Web.config上绑定配置中的
maxBufferSize
maxBufferPoolSize
maxReceivedMessageSize
maxStringContentLength
maxArrayLength
等,但它仍然不起作用


还有其他想法吗?

我已经在这篇文章中找到了解决方案

仅供参考,您使用的似乎是服务参考,而不是Web参考。顺便说一句,这是正确的举措。