From http://www.microsoft.com/download/en/details.aspx?id=28942

ASP.NET MVC 4 also includes ASP.NET Web API, a framework for building and consuming HTTP services that can reach a broad range of clients including browsers, phones, and tablets. ASP.NET Web API is great for building services that follow the REST architectural style, plus it supports RPC patterns.

If ASP.NET MVC 4 supports RPC style communication what does that mean for WCF?

On what basis should we chose to use WCF or ASP.NET MVC Web API's RPC mechanism?


1 Answer 1


Nothing. You're still free to use WCF where it is most suitable, or at your own discretion.

ASP.NET MVC has supported a RESTful communication style since its inception, and many people use it as a thin veneer for RESTful services. That doesn't automatically cause WCF to go obsolete, or make ASP.NET MVC the One Tool to Rule Them All™.

This is why carpenters and other craftsmen don't just have one type of hammer. They have several different types, each optimized for a particular type of hammering.

To help you decide which to use, listen to this Hanselman podcast:

This is not your father's WCF - All about the WebAPI with Glenn Block

How does WCF fit into a world of Web 2.0 lightweight APIs? What's the WCF WebAPI and how does compare to services in ASP.NET MVC?

I haven't personally looked at it yet, but it wouldn't surprise me if the Web API you refer to in ASP.NET MVC 4, and the new WebAPI in WCF, turn out to be the same thing. Phil Haack is probably using WCF to implement WebAPI internally in ASP.NET MVC 4, or they both resolve to the same internal mechanism.

See Also

  • Indeed, ASP.NET Web API is the new name of WCF Web API. It's been renamed for its inclusion with the ASP.NET MVC 4 Beta.
    – Eric King
    Feb 16, 2012 at 19:50
  • 1
    I don't think Phil is working at Microsoft any more, and I don't think he was on the team that implemented WebAPI. That said, he may have been involved with exposing WCF over ASP.NET/MVC prior to leaving. Also +1 for the link to the Hanselminutes podcast regarding the subject.
    – Kyle
    Feb 16, 2012 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.