Hi All,
If you are planning to get started with REST in WCF, the following information might be helpful.
What is REST?
Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. As such, it is not strictly a method for building “web services.” The terms “representational state transfer” and “REST” were introduced in 2000 in the doctoral dissertation of Roy Fielding,[1] one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification.
REST strictly refers to a collection of network architecture principles which outline how resources are defined and addressed. The term is often used in a looser sense to describe any simple interface which transmits domain-specific data over HTTP without an additional messaging layer such as SOAP or session tracking via HTTP cookies. These two meanings can conflict as well as overlap. It is possible to design a software system in accordance with Fielding’s REST architectural style without using HTTP and without interacting with the World Wide Web.[2] It is also possible to design simple XML+HTTP interfaces which do not conform to REST principles, and instead follow a model of remote procedure call. The difference between the uses of the term “REST” therefore causes some confusion in technical discussions.
Systems which follow Fielding’s REST principles are often referred to as “RESTful“.
What are RESTful Web Services?
A RESTFul web service is a simple web service implemented using HTTP and the principles of REST. Such a web service can be thought about as a collection of resources. The definition of such a web service can be thought of as comprising three aspects:
- The URI for the web service such as
http://example.com/resources/cars - The MIME type of the data supported by the web service. This is often JSON , XML or YAML but can be anything.
- The set of operations supported by the web service using HTTP methods (e.g. POST, GET, PUT or DELETE).
Members of the collection are addressed by ID using URIs of the form <baseURI>/<ID>. The ID can be any unique identifier. For example if a RESTFul web service representing a collection of cars for sale might have the URI http://example.com/resources/cars. f the service uses the car registration number as the ID then a particular car might be present in the collection as http://example.com/resources/cars/yxz123.
The following table shows how the HTTP verbs are typically used to implement a web service.
| Resource | GET | PUT | POST | DELETE |
|---|---|---|---|---|
Collection URI such as http://example.com/resources/cars/ |
List the members of the collection. For example list all the cars for sale. | Not generally used. Meaning defined as replace the entire collection with another entire collection. | Create a new entry in the collection where the ID is assigned automatically by the collection. The ID created is typically returned by this operation. | Not generally used. Meaning defined as delete the entire collection. |
Member URI such as http://example.com/resources/cars/yxz123 |
Retrieve the addressed member of the collection | Update the addressed member of the collection or create it with a defined ID. | Not generally used. | Delete the addressed member of the collection. |
What are WCF Rest Services?
WCF Rest Services are normal WCF Services that have added functionality so that they can be consumed in a RESTful manner (URI vs URL, Usage of HTTTP Verbs, Usage of Different Data Transfer Formats like JSON, YAML, etc…). So for example, if you had a stock ticker web service that you built in WCF, instead of requiring the caller to use a heavy WSDL implementation and ASMX, you could just use the WCF Rest functionality to publish that service as a JSON service instead and have it consumed via AJAX without having to point to an ASMX resource.
An example of WCF REST Service in .Net Framework 3.5:
WCF 3.5 provides explicit support for RESTful communication using a new binding named WebHttpBinding.
The below code shows how to expose a RESTful service
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}
Microsoft has released a white paper in early 2007 comparing different distributed communication technologies with WCF. (including REST Services).
You can download this whitepaper from here (http://msdn.microsoft.com/en-us/library/bb310550.aspx)
Though there are loads of information on REST these days, i found the following links to be very insightful and helpful in understanding this technology.
How-to create a WCF Restful Service Video ( http://channel9.msdn.com/pdc2008/TL35/)
An Introduction to WCF Restful Web Services by Jon Flanders in MSDN MagazineĀ Jan 2009
A Guide to Designing and Building Restful Web Services using WCF 3.5 by Aaron Skonnard on MSDN in Oct 2008
WCF Blog Series:
- REST in WCF – Part I (REST Overview)
- REST in WCF – Part II (AJAX Friendly Services, Creating The Service)
- REST in WCF – Part III (AJAX Friendly Services, Consuming The Service)
- REST in WCF – Part IV (HI-REST – Exposing a service via GET – Configuring the service)
- REST in WCF – Part V (HI-REST – Exposing a service via GET – The ServiceContract and Implementation)
- REST in WCF – Part VI (HI-REST – Consuming our GET service via AJAX)
- REST in WCF – Part VII (HI-REST – Implementing Insert and Update
- REST in WCF – Part VIII (HI-REST – Implementing Delete)
- REST in WCF – Part IX – Controlling the URI
- REST in WCF – Part X – Supporting Caching and Conditional GET
Screencast Series on Channel9:
- endpoint.tv – Controlling the URI in RESTful WCF with Rob Bagby
- deCast – Creating a HI-REST GET Service with WCF 3.5
- deCast – Consuming a HI-REST GET Service From Silverlight 2 (Beta 2)
- endpoint.tv – Caching and Conditional Get with Rob Bagby
- deCast – Creating an AJAX-Friendly WCF Service
- deCast – Creating a HI-REST PUT Service That Exposes Insert and Update
- endpoint.tv – Securing RESTful services with ASP.NET Membership
- endpoint.tv – Content Negotiation with RESTful services
- deCast – Tunneling a PUT through POST with RESTful WCF
MSDN WebCasts:
REST and WCF 3.5 - Adnan Masood (LEVEL 200)
VS 2008, WCF and REST – (Level 200)
REST and ASP.Net MVC - Brian Hitney (Level 200)
REST and ADO.Net Services – Chad Brookes (Level 200)
MSDN Code Samples:
REST and POX (http://msdn.microsoft.com/en-us/library/aa395208.aspx)
For further queries on troubleshooting and general advice, you can also check out REST Forums from MSDN.
Enjoy!

[...] the original here: Getting Started with REST in WCF Share and [...]
By: Getting Started with REST in WCF :My Info Web on March 15, 2009
at 17:54
eS0Y70 http://gdjI3b7VaWpU1m0dGpvjRrcu9Fk.com
By: frenky on May 7, 2011
at 23:02
great article. Please go through REST WCF 4 Service using VS 2010 Article for more info..
By: ultimatetutorial on May 30, 2011
at 2:54
Could I order a new chequebook, please? young lesbian mpeg bcxwd
By: Vazamnbh on September 4, 2011
at 9:53
How do I get an outside line? lesbian teens showering %-]
By: Yiutyryx on September 6, 2011
at 13:00
Sorry, I ran out of credit nn teen model
:[[
By: Kvxcncpa on September 8, 2011
at 22:45
Where do you come from? young first time loli :-O
By: Trvzsaxx on September 9, 2011
at 0:44
What do you do? Illegal Preteen Nymphets %-(
By: Zltqmtpq on September 21, 2011
at 11:49
What sort of music do you like? Kds Tgp Bbs qnl
By: Anwlxjmi on September 25, 2011
at 23:53
Nice to meet you Immagini Il Cassonetto Nn Una Culla
8PP
By: Gwewyijp on September 28, 2011
at 5:12
How many more years do you have to go? Greatlolita Bbs
4176
By: Liwevcrr on December 7, 2011
at 10:33
I’m at Liverpool University http://senitopaif.de.tl young pussy bbs I love it when the girl gets to cum and THEN she gets fucked. This is how it should be, the hornier the girl, the better it feels when you fuck her. Yes this woman is very hot.
By: Ctadndbd on May 3, 2012
at 12:19
Your account’s overdrawn http://iyhatoosina.de.tl teens free nymphets Worst pussy licking I’ve ever seen in my life. And honestly, this dude doesn’t know how to treat a pair of big tits.
By: Sgkzpxll on May 4, 2012
at 20:30
Through friends http://ubufeduo.de.tl little girls undressed I have always find this guy so sexy, makes me wet so easily, however i prefer him with short hair instead of that nonsense ponytail
By: Xzsdyszp on May 6, 2012
at 5:08
How did you make this blog site look this awesome!? Email me if you get the chance and share your wisdom. .
By: news on May 27, 2012
at 16:54
Jesus Christ there is lots of spammy feedback on this website. Have you actually thought about trying to get rid of them or installing a wordpress plugin?
By: news on May 29, 2012
at 11:03
Can you please remove “non-technical” comments?
By: Bazil on October 18, 2012
at 14:36