1.

What is the difference between WCF Rest and Web API?

Answer»

It is difficult to say which one is better between Web API and WCF Rest service. Both the TECHNOLOGIES have their own significant in the context of development, hosting and consuming the service.Although both WCF REST and ASP.NET Web API follow the REST architecture, these have the following differences:  

WCF Rest 

  • Microsoft has introduced “WebHttpBinding” that needs to be enabled for creating WCF RESTful SERVICES
  • HTTP Methods are mapped to attributes. So, for each method there must be attributes like – “WebGet” for GET and “WebInvoke” for POST verbs. 

Web API 

  • Unlike WCF Rest we can use the full features of HTTP in Web API. 
  • Web API can be hosted in IIS or in applications. 

WCF REST
ASP.NET Web API
1“WebHttpBinding” to be used for creating WCF RestFul services.
WebAPI Supports full features of HTTP.
2HTTP Methods are mapped to attributes for EXAMPLE GET for WebGet and POST for WebInvoke.
It possible to host Web API in IIS as WELL as in an application.


Discussion

No Comment Found