How would you reccommend handling RSS Feeds in ASP.NET MVC? Using a third party library? Using the RSS stuff in the BCL? Just making an RSS view that renders the XML? Or something completely different?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is what I recommend:
Once you change the content type to rss, you will want to serialize the data to RSS (using your own code or another library) and write to the response.
Create an action on a controller that you want to return rss and set the return type as RssResult. Grab the data from your model based on what you want to return.
Then any request to this action will receive rss of whatever data you choose.
That is probably the quickest and reusable way of returning rss has a response to a request in ASP.NET MVC.