3

I think WCF uses SOAP protocol. WebAPI uses rest architecture. But WCF supports both SOAP and REST.

  1. What is difference between WCF REST and WebAPI?
  2. Why is there a general preference for WebAPI?
tom redfern
  • 30,562
  • 14
  • 91
  • 126
  • possible duplicate of [WCF vs ASP.NET Web API](http://stackoverflow.com/questions/9348639/wcf-vs-asp-net-web-api) – Tim May 12 '15 at 07:56
  • this link will clear all your doubts. http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html – Gaurav Shah May 13 '15 at 14:26

1 Answers1

3

WCF is protocol agnostic. It can run over http, tcpip, net pipes, etc. Web API is more suited for building rest apis.

However, your question is too broad to be answered here. Read more about both technologies and come back with more specific questions.

Oscar
  • 13,594
  • 8
  • 47
  • 75
  • It has to be said that even though WCF with webHttpBinding allows you to build fully functional REST API, it seems easier to do it with Web API as WCF was not designed for REST services at first. – Pawel Wrobel May 12 '15 at 07:35