+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / 401 Unauthorized when trying to read RSS

401 Unauthorized when trying to read RSS

4 posts, 0 answered
  1. CWaters
    CWaters avatar
    15 posts
    Registered:
    04 May 2010
    23 Jun 2010
    Link to this post
    I am trying to consume an RSS feed from Sitefinity to display news items on a seperate intranet site.

    When I try to read the xml from the RSS that I created it keeps returning 401 Unauthorized.

    Is there something I'm missing on how to consume an RSS feed from sitefinity on another site?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Jun 2010
    Link to this post
    Hello CWaters,

    There are not any specific requirements or settings about Rss feed consuming. For instance the following very basic code illustrates how you can consume the Rss feeds from Sitefinity's blog

    var reader = new XmlTextReader("http://www.sitefinity.com/blogs/devblogs.rss");
     
     DataSet ds = new DataSet();
     ds.ReadXml(reader);
     
     GridView grid = new GridView();
     grid.DataSource = ds.Tables[2];
     grid.DataBind();
     Controls.Add(grid);

    Most probably you have denied the request to the rss feed or you have applied some other IIS restrictions.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. CWaters
    CWaters avatar
    15 posts
    Registered:
    04 May 2010
    23 Jun 2010
    Link to this post
    That is exactly what my code looks like.

    Would I have to add permissions for the Anonymous User if I'm using Windows Active Directory for Authentication?

    I even added

       <location path="~/News.rss.ashx">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>
     

     



    to my web.config and I'm still getting a 401 Unauthorized error.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Jun 2010
    Link to this post
    Hi CWaters,

    It looks like you are forcing some authentication over the whole website or certain pages/requests, so you need to add an exception.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered