36 posts

Hi devs!

Is there any built in mechanism in webnodes which I can use to crete RSS feed? Is OData sth that could be used in this case?

Regards,
Andrzej 

181 posts

Hi!

There is no built in RSS feed functionality (apart from in the blog module), since it is alreay in the .Net framework System.ServiceModel.Syndication namespace. See the SyndicationFeed class. A short example:

public void ProcessRequest(HttpContext context)
{
    SyndicationFeed feed = CreateRecentSolutionsFeed();
 
    var output = new StringWriter();
    var writer = new XmlTextWriter(output);
 
    new Rss20FeedFormatter(feed).WriteTo(writer);
 
    context.Response.ContentType = "application/rss+xml";
    context.Response.Write(output.ToString());
}

Example from http://dovetailsoftware.com/clarify/kmiller/2009/02/06/creating-rss-feeds-using-asp-net/

 

 

 

36 posts

Ok, I see. We will use the Syndication namespace then. Thanks!

1