Getting error "The element with name 'html' and namespace '' is not an allowed feed format."

1.3k views Asked by At

"The element with name 'html' and namespace '' is not an allowed feed format."`

  using (XmlReader reader = new SyndicationFeedXmlReader(client.OpenRead("http://community.psenetwork.org/rss/forums/1-most-recent/")))
  {
     var feed = SyndicationFeed.Load(reader);
     if (feed != null)
     {
        var feedItems = feed.Items.Take(3);
        communityFeedDataList.DataSource = feedItems;
        communityFeedDataList.DataBind();
     }
  }           

When the statement below executes it throws and exception like "The element with name 'html' and namespace '' is not an allowed feed format."

var feed = SyndicationFeed.Load(reader);

While we hit the given URL in browser we get the valid XML.

0

There are 0 answers