Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to create wcf webservice that should response in JSON format not xml format and database (sqlserver) connectivity

and i heard rest wcf service. i think wcf webservice is also called as rest wcf service. please explain that also.

kindly help me with full explanation.

Thanks a lot,.

somebody posted link .but that not belong to data accessing from database. so, pls help me out.

i am gonna to use software tool: vs 2010,sqlserver , .net 4.0
Posted

1 solution

WCF Webservice and REST Web services aint same. WCF WS may or may not be REST and REST may or may not be implemented using WCF. REST uses the http verbs (GET, DELETE, PUT, POST etc). To specify JSON as the format of data interchange, you need to add "RequestFormat=WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json" in the WebInvoke attribute.

Please refer to the article - WCF REST Service with JSON for more details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900