- WCF and Web services are SOAP based services.
- They use HTTP as the Transport level protocol. They use HTTP just to tunnel SOAP messages across internet.
- Now SOAP messages are internally XML and some clients like VB6, jQuery are not very comfortable to handle SOAP messages because handling xml is not an easy task.
Rest is an architectural style which says “Use the existing features of the web in more effective, efficient and simpler manner”.
- HTTP has support for verbs like GET,POST,DELETE and POST
- In HTTP world every resource will be identified by a URI
- In order to transmit data across XML is not the only way. We can even have JSON any many more.
Services which are created considering this features into mind are called HTTP REST services and Microsoft’s implementation of HTTP REST is called WCF REST services.
Problem with WCF REST and how it is solved?
Main idea behind WCF was to support SOA not to support REST. That’s why in order to create HTTP REST service using WCF require lots of configuration which is a tedious task. Microsoft wanted something simpler and finally it came up with one which has been made the part of Asp.NET itself and that is called as Asp.NET Web API.
How Asp.NET Web API is defined?
It’s a part of Asp.NET technology for creating HTTP REST services.
WCF interview questions with answers :- Difference between service end point and client end point.