what are REST services on WCF? RRS feed

  • Question

  • what are REST services on WCF? Is it something accessed thru https? what are the changes we need to do to implement the RESTful service in our project.
    Thanks!! MCP
    Wednesday, May 19, 2010 8:51 AM

All replies

  • Hi, maybe this will help you out. It is an introduction to REST and WCF Services.

    Wednesday, May 19, 2010 12:42 PM
  • Thanks for the reply but still not very clear, Can anyone tell me in layman language , why do I need REST service why not normal web service?
    Thanks!! MCP
    Thursday, May 20, 2010 8:39 AM
  • Hi,

     WCF REST, actually provides Plain-Old-Xml (POX), result when the WCF service is browsed. In correct word it can be explained that, as like in web services, it was possible to invoke WebMethod in browser by passing parameters to it, same thing we can do in WCF REST. WCF has FREST support form .NET 3.5 SP1.

    Following are the cahnges we nedd to do:  

    Add refernece for System.ServiceModel.Web, in service application.

    Use [WebGet] attribute on Operation in service conmtract




    string GetData(string val) 

    WCF REST has support for Http verbs like GET,POST,PUT and DELETE

    Http GET can be performed using [WebGet] and POST,PUT and DELETE can be using [WebInvoke] operation.

    The binding ypu can use for WCF REST is webHttpBinding. And to activate it on IIS you need to use additional value in Service.svc file


    For the further I have posted article on WCF REST and its consumption in varipous clients:

  -> Consuming in WPF 3.5 -> REST with Windows Authentication. -> Consuming in Windows Mobile 6. -> Consuming in Silverlight 3.0. -> WIndows Phone 7.

    All these articles will definately help you.




    MAhesh Sabnis







    Friday, May 21, 2010 11:15 AM
  • Hi,

    Actually I live in basic .Net world and these JASON, WPF, Silverlight are out of my scope currently. Though I know WCF some so when we create a REST service by this I mean we can access the service using the url (eg: that means for consuming the REST service we don't have to create a proxy class and call the service method thru the proxy object and then pass the parameters. Please correct me if I am wrong. Because after looking into some example to REST service consumer as JSON,WPF I very much confused.

    Moreover, generally bolgs have REST similar URL, I guess, like, please again correct me if I am wrong??

    • Edited by GurunGuns Thursday, June 3, 2010 10:50 AM update
    Thursday, June 3, 2010 10:46 AM