计算Web服务中数据集的时间和大小 [英] calculate time and size of dataset in webservice

查看:110
本文介绍了计算Web服务中数据集的时间和大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.当我使用Web服务和接收数据(数据集)时
我想获取可以下载并计算时间的服务的总大小.
如何在Web服务中存在的数据集中给出siz.
我的网络服务是"
"http://ww2.tsetmc.com/webservice/tsepublic.asmx">
fimedownloder不能帮助我,因为bec filedownloader(存在存档中)仅下载zip文件或其他.不是数据集
谢谢.

解决方案

嗯,这取决于服务.通常,数据将作为XML通过HTTP.因此,也许这就是您需要的XML的大小?如果是这样,您将无法使用常规的.NET Web服务客户端对其进行计时,因为它不够准确.而是使用HTTP客户端并安排GET/POST请求的时间-这样会更准确.


但是为什么呢?如果您的Web服务返回的数据太多,您不得不担心它,也许您应该重新考虑您的设计和/或实现.

如果您的Web服务正在创建文件,则让它创建文件并将大小返回给调用应用程序,然后让该应用程序确定传输所需的时间.


hi . when i use web service , and recive data ( dataset )
i want take totall size of service that ready to download and calculate timing .
how to give siz in dataset that in webservice exist .
my web servis is "
"http://ww2.tsetmc.com/webservice/tsepublic.asmx">
fimedownloder not help to me bec filedownloader ( in archive exist ) only download zip file or other . not dataset
thanks .

解决方案

Well it depends on the service. Typically the data would go through HTTP as XML. So perhaps it''s the size of that XML that you need? If so you cannot time it using a regular .NET web service client as it won''t be accurate enough. Instead use an HTTP client and time the GET/POST requests - that would be more accurate.


But why? If your web service is returning so much data that you have to worry about it, maybe you should reconsider your design and/or implementation.

If your web service is creating a file, let it create the file and return the size to calling application, and let that application determine how long it''s going to take to transfer.


这篇关于计算Web服务中数据集的时间和大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆