传输大量文件,最好是webApi或wcf [英] Transfer a large amount of files, which is better, webApi or wcf

查看:74
本文介绍了传输大量文件,最好是webApi或wcf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

webApi 还是 wcf  最好的

如果这样的话,哪个更好.

Hello friends,

I need to develop a service which receives a quantity of files, whether webApi or wcf are the best,

And if so what is better.

谢谢

推荐答案

YoniAL,

Hi YoniAL,

WCF是什么意思?是WCF肥皂服务还是WCF休息服务?如果您指的是WCF Rest Service,我认为传输文件没有太大区别,它们都使用http协议.速度和客户端请求类型相似.我认为有区别 在WCF Rest Service和Web api之间,Web api更完整,并且所有Rest功能都得到了改进.

What do you mean by WCF? Is it WCF Soap Service or WCF Rest Service? If you mean WCF Rest Service, I think there is no much difference when transferring files, both are using http protocol. The speed and client request type is similar. I assume the difference is between WCF Rest Service and Web api, Web api is more complete and all Rest feature improvements.

如果您指的是Web API和WCF Soap,则出于速度/带宽方面的考虑,我更喜欢Web api. Web API仅使用基本的HTTP,请求和响应包通常小于SOAP请求和响应包,后者将参数,对象,metdata等打包在其中. 厚的通常是XML的有效负载但是我认为它也与您的客户端类型有关,如果不是Ajax客户端和winform,我更喜欢WCF Soap,它可以自动生成客户端代码,并且方便将请求发送到服务.

If you mean Web API and WCF Soap, for speed/bandwidth, I would prefer Web api. Web API only uses basic HTTP, the request and response packets are generally smaller than SOAP request and response packets which package parameters, objects, metdata, etc in a thick, usually XML, payload. But I think it is also related with your client type, if it is not Ajax client and winform, I would prefer WCF Soap, which will generate the client code automatically and is convenience to send request to service.

结论是,如果您的客户端是Ajax客户端,那么我希望使用WebApi.

In a conclusion, if your client is Ajax client, I would prefer WebApi.

最好的问候,

爱德华


这篇关于传输大量文件,最好是webApi或wcf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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