I want to create one restful web service in c#,which fetch the data from database and return the result into the Json format.and the json result will be used by my android mobile application for parsing and result will be display.The database is stored in my local machine. so when I going to visual studio 2012 for new project than it is displaying so many option like WCF service library,WCF service application,ASP.net empty web application etc.so according to my requirement which option is best one.can you help for this....
Asked
Active
Viewed 667 times
-2
-
Why __android__ tag?? – M D Mar 11 '15 at 05:36
-
I will use JSON result into android for parsing – sheetal. gami Mar 11 '15 at 05:37
1 Answers
1
What you want is ASP.NET WebAPI.. I'm not sure if there is a template for this in VS2012 (there is in VS2013), but you can get there by creating an empty ASP.NET web application and adding the relevant packages through NuGet.

Jens Neubauer
- 1,090
- 1
- 13
- 24
-
I read some article,in that peoples said that if you want to use your service through different application like mobile,console etc than best option is to use web service library – sheetal. gami Mar 11 '15 at 05:42
-
2If you want to create a RESTful web service, WebAPI is hands down the best choice, since it has pretty much everything already built in for that, If you want to do SOAP, then use a Web Service library. The client has nothing to do with that choice (except that Javascript or Android application generally have an easier time with REST). – Jens Neubauer Mar 11 '15 at 05:45
-
so what is you suggestion web service library or some thing else – sheetal. gami Mar 11 '15 at 05:49
-
You said you want to create a RESTful web service in C#, so my answer stands: Use ASP.NET WebAPI. – Jens Neubauer Mar 11 '15 at 05:52