In My previous article “Creating Web feeds with WCF” , I have explained about building a web feed with WCF. This post explains how to build a simple WCF service that exposes the feed data using both RSS and Atom.
We are using both formats to emphasize the separation in WCF between the data [SyndicationFeed] and the formatting [SyndicationFeedFormatter].We can write the methods to return the Atom10FeedFormatter or the Rss20FeedFormatter.
The service contract is:
Now you can host this service in any of the WCF Hosting options.
The base URI of this service will look like /feed.atom">/feed.atom">http://localhost/EventLogFeed/<Application>/feed.atom or /feed.rss">/feed.rss">http://localhost/EventLogFeed/<Application>/feed.rss
The content in this article is based on Jon Flander’s article in visual systems journal.
Once we decided which formatted data that we want to use for the feed URI then rest of the things are taken care by WCF infrastructure.