Question

I've gone over other WCF vs Web API question as well as blogs. It is possible to write HTTP service with webHttpBinding in WCF too. So why should one move to Web API when it is possible to use WCF for the same purpose. Some say it's easy to use HTTP in Web API. But in what sense.

A lot of blogs make me confused. Most of them are like " You can do HTTP in WCF but Web API is pure REST based. You can use Web API if you want but you can use WCF too". It's like salesman describing their product which is really confusing for me here.

I have old asmx service which I want to move to REST Service. I tried WCF with webHttpBinding. It works well but why should one move to Web API?

Was it helpful?

Solution

If you already have a WCF service that you're satisfied with, then you're done. No need for WebAPI.

You would use WebAPI if there are features of the WebAPI which WCF cannot conveniently supply. The WebAPI is "closer to HTTP", whereas WCF is a generic communications framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top