Wcf have more reliable protocols using them we can build web services with reliable actions, using transactions.
If anyone wants to develop restful services than wcf's basichttpbinding is used to develop that kind of app, in which authentication and authorization is not supported. by the way anyone can apply custom logic for authentication and authorization.
while web api supports only http protocal using authentication and authorization.
WCF is better if you are going to develop an application for known clients (For e.g. windows client, web client, Peer to peer communication etc) which provides nettcp,tcp protocols with transaction support as well. You can find more in detail in above links.
Please refer above link to find more differences between these two.
Thanks
Mark post as answer if it helps you to find your way.
Choose WCF when you want to create a service that should support special scenarios such as one way messaging, message queues, duplex communication etc.
Choose WCF when you want to create a service that can use fast transport channels when available, such as TCP, Named Pipes, or maybe even UDP (in WCF 4.5), and you also want to support HTTP when all other transport channels are unavailable.
Choose Web API when you want to create a resource-oriented services over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats).
Choose Web API when you want to expose your service to a broad range of clients including browsers, mobiles, iphone and tablets.
Hope it helps you. Let me know if any query remains.
Participant
1162 Points
363 Posts
Difference between WCF And Web Api
Jan 13, 2014 04:31 AM|gaurabchatterjee|LINK
Dear Friends,
I just need to know for concepts purpose. Whic is better WCF or WEB API and Why ?
I have confusion . Please clear it
Microsoft Technologies
Getting information off the Internet is like taking a drink from a fire hydrant.
Participant
1101 Points
341 Posts
Re: Difference between WCF And Web Api
Jan 13, 2014 05:23 AM|k.panchal|LINK
http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx
Wcf have more reliable protocols using them we can build web services with reliable actions, using transactions.
If anyone wants to develop restful services than wcf's basichttpbinding is used to develop that kind of app, in which authentication and authorization is not supported. by the way anyone can apply custom logic for authentication and authorization.
while web api supports only http protocal using authentication and authorization.
WCF is better if you are going to develop an application for known clients (For e.g. windows client, web client, Peer to peer communication etc) which provides nettcp,tcp protocols with transaction support as well. You can find more in detail in above links.
Please refer above link to find more differences between these two.
Thanks
Ketan Panchal
Contributor
2347 Points
677 Posts
MVP
Re: Difference between WCF And Web Api
Jan 13, 2014 07:52 AM|damienBod|LINK
Don't use WCF unless you have a requirement which requires it. Alway use Web Api 2.
Here's a list of reasons for choosing WCF, otherwise always choose Web Api.
What’s WCF got that Web Api 2 and SignalR don’t have:
Here's an link which go into detail about the differences and at the bottom is lots of links to this theme, pros and cons
http://damienbod.wordpress.com/2013/11/13/the-end-of-wcf-is-on-the-horizon/
greetings Damien
All-Star
37441 Points
9078 Posts
Re: Difference between WCF And Web Api
Jan 13, 2014 08:01 AM|AidyF|LINK
"The end of WCF is on the horizon" - I give that the same respect I give journalists who claim that tablets mean the end of the laptop or desktop PC.
Contributor
3829 Points
1284 Posts
Re: Difference between WCF And Web Api
Jan 13, 2014 08:11 AM|matifnadeem|LINK
Hi buddy,
To whom choose between WCF or WEB API
Choose WCF when you want to create a service that should support special scenarios such as one way messaging, message queues, duplex communication etc.
Choose WCF when you want to create a service that can use fast transport channels when available, such as TCP, Named Pipes, or maybe even UDP (in WCF 4.5), and you also want to support HTTP when all other transport channels are unavailable.
Choose Web API when you want to create a resource-oriented services over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats).
Choose Web API when you want to expose your service to a broad range of clients including browsers, mobiles, iphone and tablets.
Hope it helps you. Let me know if any query remains.
Cheers