如何将大文件从桌面传输到服务器 (.NET)
我正在编写一个基于 .NET 2.0 的桌面客户端,它将向服务器发送大文件(小于 2GB)。还需要开发服务器。服务器可以采用任何技术 它应该是安全的,因此需要底层 SSL 流 我有什么选择。我应该注意的任何明显的警告等 在我看来,最简单的解决方案是通过 SSL 打开到服务器的 tcp\ip 连接,并发送 n 个数据包,每个数据包大小为 M 字节,然后让服务器将块附加到文件中,最后发送 EOF 数据包,
这太可怕了。所有这些磁盘写入会导致服务器性能下降吗 还有什么其他聪明的选择。我在客户端上仅限于 .NET 2.0 如果我确实转向 WCF 客户端,对于这种情况,它会带来神奇且酷炫的东西吗? 谢谢
I am writing a .NET 2.0 based desktop client that will send large files ( well largish under 2GB) to a server. Need to develop the server as well. Server can be on any technology
It should be secure so an underlying SSL stream is needed
What are my options. Any obvious caveats etc I should be aware of
To my mind the simplest solution is to open a tcp\ip connection over SSL to the server and send n packets each of size M bytes and then have the server append the chunks to the file and finally send an EOF packet as well
IS this horrible. Will the perf suck on the server with all these disk writes
What are any other clever options. I am limited to .NET 2.0 on the client
if I did move to a WCF client will it buy be something magical and cool for this scenario
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 Windows 计算机上已有的 BITS 服务(后台智能传输服务)。许多操作系统子系统(例如 Windows Update)都使用它来利用空闲网络带宽传输大量数据。
使用 BITS 之类的最大优点是传输是可中断和可重新启动的 - 当稍后恢复传输时,部分上传将被保留并合并。
您通常认为 BITS 是将文件从服务器传输到客户端计算机,但显然 BITS 可用于从客户端上传到服务器 - 有一些第三方实用程序使用 BITS 上传 - 包括 YouTube 上传程序。
维基百科上有关 BITS 的更多信息:http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service
Take a look at the BITS service (Background Intelligent Transfer Service) that's already on your Windows machines. It's used by a lot of OS subsystems such as Windows Update to transfer large amounts of data using idle network bandwidth.
The biggest advantage to using something like BITS is that the transfer is interruptible and restartable - partial uploads are retained and coalesced when the transfer resumes later.
You usually think of BITS as transferring files from a server down to the client machine, but apparently BITS can be used to upload from the client to the server - there are third party utilities that use BITS to upload - including the YouTube uploader.
More info on BITS on Wikipedia: http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service
您可以使用BITS(后台智能传输服务)。
You can use BITS (Background Intelligent Transfer Service).