Click here to Skip to main content
15,920,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In one of our products we extensively use WCF services. Since we are looking to port the product to other platforms(Android, web...) I started to look at implementing REST services with .NET. I found quite few APIs - The WCF REST starter kit, the WCF web api, and finally web api. The starter kit is no longer supported. It seems that I should use the web api. But I am not sure if the web api is something new or is just renamed and extended WCF web api. Does knowledge about WCF web api helps you to use the new web api or not? Another thing I am not sure about is how should the two-way communication be handled in the web api. In WCF I used the TCP binding which enabled you to call a method on a client from the server. In asmx web services I handled that with a client which opened a connection to the server and the server replied when the data for that client was available. Then the connection was re-opened. Is that a valid approach when using the new web api?

Updated 27-Feb-12 13:48pm

1 solution

Recommended WCF REST service development, is using WCF Web API. ASP.NET Web API released with ASP.NET MVC 4 Beta. The WCF Web API and WCF support for jQuery content on this site wll removed by the end of 2012.

WCF Web API has features like:
Out of the box support for XML, JSON and OData
Typeless JSON support
Plug in any format / media type
IQueryable support
Simple code-based configuration model
Support for HTTP file upload and MIME-based batching
Integrated Web API test client
Share this answer
koleraba 27-Feb-12 22:32pm    
Sorry I don't think I understand. If the WCF Web API will be removed by the end of 2012, than I am better of with the ASP.NET MVC 4(beta for now). Do you have any ideas how to handle the "tho way communication" described in my original question? I did some furher searching on this topic and I think that this could be solved with AsyncController in ASP.NET MVC.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900