Click here to Skip to main content
15,890,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
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 asp.net web api. The starter kit is no longer supported. It seems that I should use the asp.net web api. But I am not sure if the asp.net 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 asp.net 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?

Uros
Posted
Updated 27-Feb-12 13:48pm
v2

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:
HttpClient
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
 
Comments
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