A Tutorial on Building RESTful Web Services with WCF 3.5


  • [WebGet], [WebInvoke] to define mappings for the Http Methods Interface
  • UriTemplate to map objects to method signatures through WebGet/WebInvoke Attributes image image
  • WebOperationContext to access the HTTP Request/Response including header and status code
  • <%@ ServiceHost Factory=”WebServiceHostFactory” to auto-config the Web endpoints binding and behavior without edit web.config.
  • aspNetCompatibilityEnabled(web.config) & AspNetCompatibilityRequirements(.cs) to access HttpContext
  • (optional) using Microsoft URL Rewrite Module for IIS 7.0 to remove the .svc from the URIs.
  • RequestFormat/ResponseFormat=WebMessageFormat.Xml/WebMessageFormat.Json through WebGet/WebInvoke Attributes.image
  • WebScriptServiceHost to auto-generate a Ajax-friendly JSON javascript proxy for web browsers. Append /js to the end of base address to get to the proxy.
  • Use SyndicationFeed, SyndicationItem, SyndicationContent to build generic logical feeds.
  • Use Atom10FeedFormatter, RSS20FeedFormatterClass to turn a SyndicationFeed object to Atom/RSS specific feed format. Method can use SyndicationFeedFormatter base class to return various formatter object.  
  • Use ServiceDocument, ServiceDocumentFormatter, AtomPub10ServiceDocumentFormatter, and Workspace to generate AtomPub service document. note: AtomPub as a standard application of the HTTP uniform interface(GET/PUT/POST/DELETE) but applied specifically to Atom feeds, which are modeled as collections of entries.
  • Too tedious, try WCF REST Starter Kit. and you can download here.

Via A Guide to Designing and Building RESTful Web Services with WCF 3.5


One thought on “A Tutorial on Building RESTful Web Services with WCF 3.5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s