I simply want to create a fairly basic REST service, so that I can expose some of the data in my asp.net/SQL server application to the outside works, like this…..
http://domain.com/api/offices – would return an xml set of office locations.
http://domain.com/api/offices/15 – would return all the details of office 15.
It’s all fairly standard stuff (including basic authentication) but there seem to be several ways to achieve this using Microsoft technologies and I don’t really know where to start. These seem to be the options…
1) WCF
2) ASP.NET MVC
3) ADO.NET Data Services
4) Rest Starter Kit project templates?
Which of these is the easiest and most “up-to-date” solution to creating a web service?
If you don’t plan on adding any other endpoints in the future (like SOAP, etc.) and the Service isn’t going to be consumed by a Silverlight client, I would suggest using ASP.NET MVC.
If Silverlight is involved, then use ADO.NET Data Services.
If you plan on building out a robust Service framework with multiple endpoint types, then use WCF.