WCF service to receive json and add entry into database

br0nks

New Member
I need to create a service which will be hosted in IIS. This service will have a function with one parameter of type string. This function will receive Json data. The client which will be using this service need to be able to access this service method with url like this:\[code\]http://[local]host/Myservice/mymethod\[/code\]I am new to services. I am using asp.net 4.0 and VS 2010. My questions are:[*]Should I create SOAP service or WCF service (I assume WCF can not be SOAP)[*]If I need to user WCF service then which type of WCF service? I see there are several types of WCF service, like REST service, Data service (and probably JSON service as well).[*]I had used this template to create WCF service. Is it good to use this: http://visualstudiogallery.msdn.microsoft.com/fbc7e5c1-a0d2-41bd-9d7b-e54c845394cd because I don't need to create data contracts etc. or may be this article where http://www.dotnetspark.com/kb/3189-create-rest-service-wcf-40-step-by-step.aspx because I don't have to change web.config and change end points manually ?[*]This service method will then parse the json using json.net and get some values and then add them in database and send email. Does it mean that I need to WCF data services?Please suggest.Regards,Asif Hameed
 
Back
Top