I'm a c# developer, I've to build a mobile app with Xamarin and I've to call a server to read and write data. I don't know if create a Web Service or a Web API server side, which's the best solution? I tried to search online and I've found many suggestions but I don't understand which's the best.
-
2Full-fledged SOAP web services (WCF) are pretty strong when it comes to server-to-server interop - but for reaching out to clients, especially mobile clients, I'd go with ASP.NET Web API and a REST style of service calls – marc_s Sep 09 '15 at 16:17
-
What's "best" is going to be opinion-based. – BSMP Sep 09 '15 at 16:20
3 Answers
IMO, ASP.NET Web API is a Web (HTTP) Service already.
Go to Learn About ASP.NET Web API, you will find at the top:
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

- 23,994
- 8
- 77
- 87
if by web service you mean .asmx web services, they are being replaced with WebAPI. I also recommend you to check NancyFX for API creation.

- 1
Clearly both are means for communications like between two applications or electronic devices over http the World Wide Web
All web services are APIs look in above figure All APIs are not web services.
Host: Web-services(Means web internet) can only be hosted on IIS- But API -Application Programming Interface can be hosted within an application or IIS because it is an application approach.-
Open Source Web-services is an not opensource (mean it use via IIS). API is an open source(when use with in application, and when use on http is not)
Design Pattern Web-services based on Protocal API is based on architectural style(so it use with in application)

- 3,897
- 11
- 38
- 57

- 332
- 3
- 4
-
-
By the way web service does not mean that it is only hosted on 'IIS'. It means it offers service over web protocols. If any query follow link :https://en.wikipedia.org/wiki/Web_service – Chandra Oct 14 '20 at 05:19