当服务响应缓慢时,调用Web服务(WCF)丢失(Silverlight应用程序)

问题描述:



  Silverlight应用程序  搜索  服务  WCF a   [ .      服务    结果( 30   )  /span>  Silverlight应用程序.

调试模式  测试:      结果将是 很快   没有  问题 然后    ( 相同    站立  a   中的断点   分钟  结果  返回   Silverlight应用程序  .

超时   我的    closeTimeout   &; " OpenTimeout   " &; ReceiveTimeout   &; &"; sendTimeout   &; :  .

曾经在那里  任何  什么  成为 发生 谢谢 

Hi,

I'm doing a Silverlight application that searches through a service (WCF) a byte []. The problem is that when the service takes too long to return the result (1h 30 min) the response is not received by the Silverlight application.

In debug mode I did a test: I called this method in a way that the outcome would begenerated quickly, and returned without any problem. Then I called this method(generating the same result) and left standing at a breakpoint in the service for 1 hourand 30 minutes after that the result returned. This result was not received by theSilverlight application.

Does not timeout, because the binding of my service is like this: closeTimeout ="04:00:00", OpenTimeout = "04:00:00", ReceiveTimeout = "04:00:00", sendTimeout ="04:00 : 00 ".

Someone has been there or have any idea what might be happening?

Thanks ...

您好,首先,如果您需要上传/下载大数据,请使用以下服务 流传输模式.如果使用字节数组,则基础二进制数据将必须使用base64编码,这将大大增加数据的大小.另外建议使用REST 服务,如果您想使用HTTP协议.您可以使用 WCF Web API 为您提供帮助.最后,您可以考虑将数据分成较小的部分.考虑客户端传输了99%数据的情况,然后出了点问题(网络错误或服务崩溃).你想强迫客户吗 重新开始? Silverlight使您可以轻松地在客户端上划分数据,并逐段传输数据.如果将数据分成100个部分,并且在转移99个部分后出现错误,则应用程序将恢复 您只需要传输最后一块即可.

Hello, first of all, if you need to upload/download large data, please use a service with streaming transfer mode. If you use a byte array, the underlying binary data will have to be base64 encoded, which greatly increase the size of the data. Also it is recommended to use a REST service if you want to use HTTP protocol. You can use WCF Web API to help you. Finally, you may consider to break the data into smaller pieces. Consider the scenario where the client has transfered 99% of the data, then something goes wrong (network error or the service crashes). Do you want to force the client to start over again? Silverlight allows you to easily divide the data on the client side, and transfer the data piece by piece. If you divide the data into 100 pieces and something goes wrong after 99 pieces have been transfered, when the application recovers you only need to transfer the last piece.