3

"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.

Amar Srivastava
  • 373
  • 3
  • 10
  • 2
    If I access that URL through fiddler, I appear to be redirected for authentication. It's highly possible the same flow would happen in your code. It's likely that your browser has some sign in/session cookies that are keeping you logged in. – Damien_The_Unbeliever Sep 15 '16 at 07:32
  • I'm also getting this. I'm using a lot of URL's from a public weather service site. The first few work but have empty element names. Then I get this error when I run into one with the name 'html' instead of a blank "". All of the XML feeds are the same and there's zero authentication so I'm not sure what's happening. – Daniel Jackson Aug 23 '17 at 14:50

0 Answers0