Answer the question
In order to leave comments, you need to log in
How to fix 403 error when trying to get RSS feed?
I ran into a rather strange problem when trying to get an RSS feed from www.joindota.com/feeds/news I
did it with the following code:
public List ReadFeed() {
rssFeed = XDocument.Load(_url);
var posts = from item in rssFeed.Descendants("item")
let title = item.Element("title")
where title != null
let description = item.Element("description")
let link = item.Element("link ")
where link != null
where description != null
select new Item {
Title = title.Value,
Description = description.Value,
Link = link.Value,
};
return posts.ToList();
public class Item {
public string Description;
public string Title;
public string Link;
}
Of course, the first thought that arises in this case is that the tape is simply not available for some reason. But no, the feed can easily be opened in any of the browsers (including WebBrowser from WindowsForms), read using any RSS Reader, and so on. Tried to load with SyndicationFeed and XMLReader - same issue. I'm stumped, I can't quite figure out what's wrong.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question