http://www.dotnet-tricks.com/Tutorial/webapi/ Ji2x050413-difference-between-wcf-and-web-api-and-wcf-rest-and-web-service.html
The. NET framework has a number of techniques for creating HTTP service, such as Web service, WCF, and Web APIs. Here's a look at the difference:
Web Service
- SOAP-based and returns XML data.
- Only HTTP protocols are supported.
- Non-open source, but XML can be understood and used by all clients.
- Can only reside in IIS.
Wcf
- It is also soap-based and returns XML data.
- is the evolutionary version of Web Service (ASMX) and supports various protocols such as TCP, HTTP, HTTPS, Named Pipes, MSMQ.
- The main problem with WCF is the cumbersome, extensible configuration.
- Non-open source, but XML can be understood and used by all clients.
- Be able to reside in IIS or other Window Service (window services).
WCF REST
- To use WCF as a WCF Rest Service, you must support webhttpbinding.
- It supports HTTP get and post.
- If you want to support other HTTP verbs, you must set IIS to accept the other verb.
- Passing data through parameters using a webget need configuration. The UriTemplate must be specified.
- Supports XML, JSON, and atom data formats.
Web API
- The the new framework for building HTTP services with easy and simple.
- Web API is open source a 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, Variou s content formats)
- It also supports the MVC features such as routing, Controllers, action results, filter, model binders, IOC container or de pendency injection, unit testing that makes it more simple and robust.
- It can be hosted with the application or on IIS.
- It's light weight architecture and good for devices which has limited bandwidth like smart phones.
- Responses is formatted by Web API ' s mediatypeformatter into JSON, XML or whatever format you want to add as a mediatypefo Rmatter
The difference between WCF, Web API, WCF REST, Web service