Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 23, 2012 10:07 AM by imghani
Feb 21, 2012 08:57 PM|LINK
We are in the prototype phase of developing a Rest Based Service to expose data as ODATA and also operations to internal clients. Initially I was evaluating WCF Rest, WCF Data Services but now seems like Asp.net Web API looks like the newer alternative.
Is there any guidance when to use which kind of technology and also on the future (Microsoft Support) for each of these technologies?
Does the Asp.net Web API replaces WCF Rest & WCF Data Services? Will Microsoft continue to invest in WCF Rest and WCF Data Services?
In elorative explanation or articles would be helpful to clear out my confusion on these technologies.
Feb 21, 2012 10:21 PM|LINK
I hear that more complete messaging on this will be coming soon. In short:
Yes, ASP.NET Web API replaces
WCF REST. WCF REST is no longer supported.
No, ASP.NET Web API does not replace WCF Data Services.
WCF Data Services is the full OData service stack, it both enables and defines OData.
ASP.NET Web API only supports a very small subset of OData.
Feb 25, 2012 07:59 AM|LINK
if we want to expose OData, we still uncertain which way is better for the long term.
Yes, NOW ASP.NET Web API ONLY supports a very small subset of OData, but Microsoft
didn't tell us its future direction. favor WCF Data Services or ASP.NET Web API.
or still provide more than one way to expose OData.
Feb 27, 2012 03:12 PM|LINK
I have to agree that I share your uncertainty, byunru.
Personally I do not see why WCF Data Services is not a candidate for merging into ASP.NET Web API and have one single way of exposing REST API's whether they are custom or OData. That way the choice would be simple.
Everything you expose via a REST API tends to have a data context anyway and I have found you need to use bits of ASP.NET MVC even when using WCF Data Services to host things. I remain to be convinced that these technologies should not be aligned.
Feb 27, 2012 04:11 PM|LINK
There are actually several flavors of WCF support for RESTful services:
So, you can still build RESTful services using WCF in .NET 4 and if you have existing SOAP assests then this might be your best bet. For new projects we recommend using ASP.NET Web API.
If you need full OData support then you should use WCF Data Services as the support for OData in ASP.NET Web API is very limited.
Feb 27, 2012 04:12 PM|LINK
To be clear, the WCF REST Starter Kit is no longer supported. WCF Web HTTP support in .NET 4 is alive and well.
Feb 28, 2012 09:00 PM|LINK
We are about to build a RESTful service offering for our ecommerce platform. A number of these services will be going live in a few months and used by ASP.Net Webforms applications. Given that MS REST support is shifting out of WCF, and ASP.Net Web API
is still in beta, that leaves me with a rather uncomfortable stone in my stomach as I consider technology selection. Is there an indication of when/how ASP.Net Web API will be released? I assume it will be part of the next Framework release, correct? Will Framework
4.0 continue to be supported as it is in the current beta?
I would love to embrace ASP.NET Web API, however I have a customer that is naturally skiddish about beta versions of software and will want to have more information concerning release targets -- as well as production support on a pre-release technology.
Given the circumstances, if ASP.Net Web API is too young for us just now, would you recommend WCF Web HTTP as the alternative?
Aug 23, 2012 10:07 AM|LINK
This is a misconception about ASP.NET Web API framework that its going to replace WCF. Its just another way of building services that are non-SOAP based e.g. plain XML, JSON string etc.
Windows Communication Foundation is designed to exchange SOAP-based messages using variety of transport protocols like HTTP, TCP, NamedPipes or MSMQ etc. While ASP.NET API is a framework for building non-SOAP based services over HTTP only.
WCF or WebAPI
WCF or ASP.NET Web APIs - My two cents on the subject.