asp.net.net-2.0webformsrss

How to create an ASP.NET RSS feed


How do I create an RSS feed in ASP.NET? Is there anything built in to support it? If not, what third-party tools are available?

I'm thinking Webforms, not MVC, though I suppose since this isn't a traditional page the difference may be minimal.


Solution

  • For built-in, there's nothing stopping you from using XmlDocument or XDocument (3.5) to build up the required XML for RSS. It's more work than it's worth though.

    I use the Argotic Syndication Framework and serve the feeds through Generic Handlers (.ashx) with the content type set to text/xml.

    The RSSToolkit is also nice. It comes with an RSSDataSource control if you're into that sort of thing. It also includes a control that will automatically insert the meta tag required for feed autodiscovery in browsers. I found the build provider for creating feeds to be a little kludgey however.