vendredi 27 juin 2014

Expert help needed - XmlReader Error in reading RSS Feed


Vote count:

0




I am trying to read an RSS feed from http://ift.tt/1oFJfqx with the following code:



//Different RSS Links
string deviant_rsslink = @"http://ift.tt/1oFJfqx";
string blogspot_rsslink = @"http://ift.tt/1pxHawk";

//Reading the links
XmlReader reader = XmlReader.Create(deviant_rsslink); //LINE WHERE ERROR OCCURS
SyndicationFeed feed = SyndicationFeed.Load(reader);
reader.Close();
foreach (SyndicationItem item in feed.Items)
{
String subject = item.Title.Text;
Console.WriteLine("Subjext is: " + subject + "\n");
}


...and I get the error:



"The underlying connection was closed: The connection was closed unexpectedly."


At first I thought deviantart might be blocking my IP so I tried this from different computers with differing IPs however the error persists, so it seems that is not the issue. To make things more difficult to track, the code works with no error at http://ift.tt/1pxHawk.


I'm still a n00b at this, and I have been trying to fix this for a two weeks now with no success. If anyone could point me in the right direction, offer any hint, or help it would be hugely appreciated.


Thank you kindly!!



asked 30 secs ago






Aucun commentaire:

Enregistrer un commentaire