1

Possible Duplicate:
Whats the difference between WCF Web API and ASP.NET Web API

ASP .NET WebAPI used to be based on WCF. I notice now that there are no more service host factories under the hood in ASP .NET WebAPI in MVC4 release (at least this seems to be the case)...

Is WCF no longer part of the WebAPI framework?

Community
  • 1
  • 1
Jeff
  • 35,755
  • 15
  • 108
  • 220

1 Answers1

4

ASP.NET Web API has nothing to do with WCF. It is a completely new framework. The entire HTTP stack upon which it is based is new.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • Actually that's not true. A chunk of the ASP.NET Web API was built by the WCF team before the team change and self-hosted ASP.NET Web API still runs on the WCF service host. – Darrel Miller Oct 10 '12 at 13:12
  • Yes, that was before the Web API was completely rewritten and self-hosted which is the case with the RTM. The `System.Web.Http` assembly which is the core of the Web API has no dependency on WCF whatsoever. – Darin Dimitrov Oct 10 '12 at 14:19
  • System.Web.Http.SelfHost is still dependent on System.ServiceModel even in the nightly builds http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/600963a4df15#src%2fSystem.Web.Http.SelfHost%2fHttpSelfHostServer.cs – Darrel Miller Oct 10 '12 at 14:32
  • No it isn't in the RTM. What you are showing is the `System.Web.Http.SelfHost` assembly, not the `System.Web.Http` assembly which is what I was referring to in my previous comment. Sorry I misunderstood your comment. You were actually saying that the SelfHost is still dependent on WCF. That's true, I agree. – Darin Dimitrov Oct 10 '12 at 14:32
  • I realize that, but System.Web.Http.Selfhost is still part of "ASP.NET Web API" – Darrel Miller Oct 10 '12 at 14:36
  • Yes, correct, if you decide to self-host the Web API. But at the end of the day it all ends in an HttpListener and HTTP.SYS. – Darin Dimitrov Oct 10 '12 at 14:37
  • What terrible fragmentation.... – Jeff Oct 10 '12 at 15:25