What is the right/best way to get data from an RSS feed using ASP.Net Core 1.0 (RC2) in C#.
I want to work with the data in the RSS feed from my Wordpress blog which
According to this issue, System.ServiceModel.Syndication has not yet been ported to ASP.NET Core. Currently, this leaves you with 2 options:
SyndicationFeed This is undoubtedly the easiest approach depending on your requirements.
If you will be deploying to windows only then you can run ASP.NET Core on top of the .NET 4.X framework. To do this, update your project.json from something like this
frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
}
to this:
frameworks": {
"net452": {
"frameworkAssemblies": {
"System.ServiceModel": ""
}
}
}
This will give you the most flexibility, in that you will still be able to run cross platform using the .NET Core framework. It requires a little more work to deserialise the string you have already obtained, but there are lots of examples on how to do just this, e.g. http://www.anotherchris.net/csharp/simplified-csharp-atom-and-rss-feed-parser/