Web Service
It is based on SOAP and return data in XML form.
It support only HTTP protocol.
It is not open source but can be consumed by any client that understands xml.
It can be hosted only on IIS.
WCF
It is also based on SOAP and return data in XML form.
It is the evolution of the web service(ASMX) and support various protocols like TCP, HTTP, HTTPS, Named Pipes, MSMQ.
The main issue with WCF is, its tedious and extensive configuration.
It is not open source but can be consumed by any client that understands xml.
It can be hosted with in the applicaion or on IIS or using window service.
WCF Rest
To use WCF as WCF Rest service you have to enable webHttpBindings.
It support HTTP GET and POST verbs by [WebGet] and [WebInvoke] attributes respectively.
To enable other HTTP verbs you have to do some configuration in IIS to accept request of that particular verb on .svc files
Passing data through parameters using a WebGet needs configuration. The UriTemplate must be specified
It support XML, JSON and ATOM data format.
Web API
This is the new framework for building HTTP services with easy and simple way.
Web API is open source an ideal platform for building REST-ful services over the .NET Framework.
Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats)
It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection, unit testing that makes it more simple and robust.
It can be hosted with in the application or on IIS.
It is light weight architecture and good for devices which have limited bandwidth like smart phones.
Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter.
To whom choose between WCF or WEB API
Choose WCF when you want to create a service that should support special scenarios such as one way messaging, message queues, duplex communication etc.
Choose WCF when you want to create a service that can use fast transport channels when available, such as TCP, Named Pipes, or maybe even UDP (in WCF 4.5), and you also want to support HTTP when all other transport channels are unavailable.
Choose Web API when you want to create a resource-oriented services over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats).
Choose Web API when you want to expose your service to a broad range of clients including browsers, mobiles, iphone and tablets.

WCF,WebAPI,WCFREST和WebService的区别的更多相关文章

  1. WCF、WebAPI、WCFREST、WebService的区别

    目录导航: 1. WCF 2. WebAPI 3. WebService 4. WCFREST 5. 如何选择WCF.WebAPI.WCFREST.WebService 1.WCF 这个是基于SOAP ...

  2. 转:WCF、WebAPI、WCFREST、WebService之间的区别

    WCF.WebAPI.WCFREST.WebService之间的区别   注明:转载 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API ...

  3. WCF、WebAPI、WCFREST、WebService 、RPC、HTTP 概念解释

    在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API.在.net平台下,你有很多的选择来构建一个HTTP Services.我分享一下我对 ...

  4. WebAPI和WebService的区别

    WebAPI和WebService的区别 WebAPI用的是http协议,WebService用的是soap协议 WebAPI无状态,相对WebService更轻量级.WebAPI支持如get,pos ...

  5. Webservice WCF WebApi 前端数据可视化 前端数据可视化 C# asp.net PhoneGap html5 C# Where 网站分布式开发简介 EntityFramework Core依赖注入上下文方式不同造成内存泄漏了解一下? SQL Server之深入理解STUFF 你必须知道的EntityFramework 6.x和EntityFramework Cor

    Webservice WCF WebApi   注明:改编加组合 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API.在.net平台下, ...

  6. 关于WEB Service&WCF&WebApi实现身份验证之WebApi篇

    之前先后总结并发表了关于WEB Service.WCF身份验证相关文章,如下: 关于WEB Service&WCF&WebApi实现身份验证之WEB Service篇. 关于WEB S ...

  7. WCF 、Web API 、 WCF REST 和 Web Service 的区别

    WCF .Web API . WCF REST 和 Web Service 的区别 The .Net framework has a number of technologies that allow ...

  8. 关于WEB Service&WCF&WebApi实现身份验证之WCF篇(2)

    因前段时间工作变动(换了新工作)及工作较忙暂时中断了该系列文章,今天难得有点空闲时间,就继续总结WCF身份验证的其它方法.前面总结了三种方法(详见:关于WEB Service&WCF& ...

  9. WCF中DataContract和MessageContract的区别

    一.代码案例 首选建立2个WCF Service,它们分别使用不同的Contract,同时创建一个Console控制台项目,作为Client: 其中,WcfServiceWithDataContrac ...

随机推荐

  1. Nodejs 集成到IIS

    http://www.hanselman.com/blog/WebMatrixAndNodejsTheEasiestWayToGetStartedWithNodeOnWindows.aspx http ...

  2. wcf资料

    WCF服务安全控制之netTcpBinding的用户名密码验证http://www.cnblogs.com/wengyuli/archive/2011/05/14/wcf-nettcpbinding- ...

  3. WordPress BackWPup插件‘tab’参数跨站脚本漏洞

    漏洞名称: WordPress BackWPup插件‘tab’参数跨站脚本漏洞 CNNVD编号: CNNVD-201308-353 发布时间: 2013-08-26 更新时间: 2013-08-26 ...

  4. 在PC上使用串口向开发板传送文件

    之前一直使用的是NFS,即网络挂载文件系统,不愁文件的传输问题,但是不幸的是 前几天网络出现故障,使这种方式没法使用 变好的驱动程序一直没法下载到开发板里面,蛋疼欲裂啊. 于是乎折磨则么使用串口传输 ...

  5. Linux学习笔记5——虚拟内存

    一.为什么要有虚拟内存 虚拟内存的提出,是为了禁止用户直接访问物理存储设备,有助于系统稳定. 二.为什么一个程序不能访问另外一个程序的地址指向的空间 1:每个程序的开始地址0x80084000 2:程 ...

  6. OpenCV 中 IplImage、CvMat、Mat中的type是怎么回事?

    在使用opencv的过程中,无论使用原始的IplImage和CvMat类型,还是用最新C++版本的Mat类型,在创建和使用过程中,经常会遇到CV_8UC1.CV_8UC3.CV_32FC3等声明,我以 ...

  7. automake---让Makefile变得更专业一点儿

    一般我们装软件时,都要运行 ./configure --prefix=/usr/local make make install 看着不断刷新的屏幕,总感觉真得好高深呀,其实我们的程序也可以这样子. 下 ...

  8. 什么是staging server

    原文链接:http://blog.csdn.net/blade2001/article/details/7194895 软件应用开发的经典模型有这样几个环境:开发环境(development).集成环 ...

  9. scrapy使用代理

    import base64 # Start your middleware class class ProxyMiddleware(object): # overwrite process reque ...

  10. String的成员方法的使用

    <%@ page language="java" contentType="text/html; charset=gbk"%> <html&g ...