简体   繁体   English

有关如何将数据流传输到服务器.NET的最佳实践

[英]Best practices on how to stream data to server .NET

Say I want to have a server that can accept 2GB file over network, HTTP. 假设我要有一台可以通过网络HTTP接受2GB文件的服务器。 And the data is easily readable with well known format, think something like CSV. 数据易于使用众所周知的格式读取,例如CSV之类的。

Is there a way to gradually process the data the user has uploaded into file upload "INPUT = FILE" control while the data is still uploading through 32kbps modem? 有没有办法逐渐将用户已上载的数据处理到文件上载“ INPUT = FILE”控件中,而数据仍通过32kbps调制解调器上载?

I'm reading HttpRequest Stream, and other streaming documentation, but haven't found a confirmation if IIS, ASP.NET even allows it and if I'm just not wasting my time. 我正在阅读HttpRequest Stream和其他流文档,但没有找到IIS,ASP.NET是否允许它以及我是否没有浪费时间的确认。

And, from development perspective, is it possible to simulate slow stream? 而且,从开发角度看,是否可以模拟慢速流?

Use WCF Streamin g that you can use netTcpBinding or basicHttpBinding . 使用WCF Streaming ,可以使用netTcpBindingbasicHttpBinding I have used it and It is super fast and efficient - really impressive. 我用过它,而且超级快速,高效-真是令人印象深刻。

And yes you can simulate slow transfer, you just need to write to your stream slowly (pauses in the middle). 是的,您可以模拟慢速传输,只需要缓慢地向流中写入(中间是暂停)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM