Using SharePoint Designer, you can aggregate RSS-Feeds into one single output using Linked sources. While testing this functionality, I ran into the problem, that I couldn’t display data from an RSS-Feed from a SharePoint-list. When you add a data source to the Server-side Scripts section, the authentication is set to “None” by default. My first thought was, to set it to “Windows authentication”, but I wasn’t able to get any data from that feed.

image

So, I tried specifying a username and a password, and it works. Here a code snippet from the SharePoint Designer-generated code:

[…]

<DataSources>
  <SharePoint:AggregateDataSource runat="server" IsSynchronous="false" id="Neue_x0020_Datenquelle1">
    <sources>
      <SharePoint:XmlUrlDataSource runat="server" AuthType="None" HttpMethod="GET" selectcommand="http://www.n-tv.de/rss"/>
      <SharePoint:XmlUrlDataSource runat="server" AuthType="None" HttpMethod="GET" selectcommand="http://www.spiegel.de/schlagzeilen/index.rss"/>
      <SharePoint:XmlUrlDataSource runat="server" AuthType="Basic" HttpMethod="GET" selectcommand="http://w2k8/_layouts/listfeed.aspx" AuthUserName="w2k8-dom\administrator" AuthPassword="abc.123">
        <SelectParameters>
          <asp:Parameter Name="List" __designer:runtime="no" DefaultValue="{DFFEF1EE-1AFC-4FDF-AF2E-E3D60D4E534E}"/>
        </SelectParameters>
      </SharePoint:XmlUrlDataSource>
    </sources>
    <aggregate>
      <concat name="data source">
        <datasource name="rss_am_www.n-tv.de" id="0" Type="Url"/>
        <datasource name="RSS-Spiegel" id="1" Type="Url"/>
        <datasource name="RSS-MeineListe" id="2" Type="Url"/>
      </concat>
    </aggregate>
  </SharePoint:AggregateDataSource>
</DataSources>

[…]

As you can see, the AuthType is set to “Basic” and there are attributes “AuthUserName” and “AuthPassword”. This password is only visible in the aspx-file on the server (the webpart page). When the page is rendered, you cannot see the password. That means, anyone, who is able to open the webpart page in SharePoint Designer can see the password. So, I recommend to use a simple user, who has only read permissions when accessing a RSS-feed from a SharePoint-list using the DataFormWebpart.

Actually I do not know, why the Windows Authentication does not work. Having a look to the logfile of the Internet Information Services shows, that the access to the feed was done anonymous, when using Windows Authentication.

Advertisements