通过WCF服务将ArrayList发送到客户端

问题描述:

嗨.

我正在开发一个简单的wcf应用程序.这样,我将数据从服务发送到客户端.在服务中,我从数据库中检索数据并将其存储在数组列表中.我需要将此特定的数组列表发送给客户端.该数组列表包含近5000行数据.我可以在数据库中检索5000行并将其存储在数组列表中,同时仅在遇到问题时才将其发送给客户端.我无法在客户端中获得此数组列表.我收到以下错误.

服务器未提供有意义的答复;这可能是由于合同不匹配,会话过早关闭或服务器内部错误引起的."



在此先感谢:)

Hi.

I am developing one simple wcf application. In that I am sending data from service to client. In service I retrieving data from database and store it in array list. I need to send this particular array list to client. This array list contains nearly 5000 rows of data. I can retrieve 5000 rows in database and store it in array list while sending this to client there only i am getting problem. I can''t get this array list in my client. I am getting the following error.

"The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shut down or an internal server error".



Thanks in advance:)

在以下情况下会发生此错误:
1)服务中出现一些异常/错误.
2)Request XML/Response XML格式存在错误.
3)发送的XML大小超出客户端的配置文件中定义的大小.

您已经给出了最大大小限制,所以我认为第1点和第2点可能是您分析原因的起点.

可能还有其他原因,例如错误提示:
1)会话被杀死,服务器关闭等.但这是极少数情况.
This Error Occurs in below scenarios:
1) There is some exception /error is coming in Service.
2) There is some error in Request XML / Response XML format.
3) Sending XML size is more than defined in Client''s Config file.

You have already given the max size limit so I think point 1 and 2 might be your start point to analyze the cause.

There may be other causes like error suggest:
1) session killed, server down etc. But these are rare cases.