This explains why the out-of-the-box RSS Feed Viewer web part has issues 
consuming the RSS Feed of a SharePoint List -
[cid:[email protected]]

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ishai Sagi
Sent: Friday, 9 May 2008 11:54 AM
To: [email protected]
Subject: [OzMOSS] RE: Reading RSS feed from SharePoint site

Double hop...
Since your sharepoint requires you to authenticate, you cannot just pass 
"UseDefaultCredentials" on the request - since you are calling from another web 
server and double hop is not allowed in .net (basically, you code is not 
allowed to pass the credentials of the user to another server).
To resolve, either set up Kerberos (which permits double hop) or enable 
anonymous access to the rss feed, or use a system account to do the request 
(and bypass security...) or ask for the user name and password in the UI and 
use them in the request.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bibhakar Saran
Sent: Friday, 9 May 2008 13:08 PM
To: [email protected]
Subject: [OzMOSS] Reading RSS feed from SharePoint site

Hi,

I am having issue reading RSS feed from a SharePoint site.

The application I am working on  is asp.NET3.5 web application.
The code is called upon from AJAX update panel to be executed in an async 
manner.

The same code works correctly when executed with aspx/ascx
The same code works for other rss feed.

When used the target (I am trying to display announcements) from SharePoint 
site:
I get "Error: Unknown error"

I hvae traced the calls using Fiddler, and couldn't see much of a difference.

Any idea, what I am up against in this case?

The code sample is shown below:

            string url = Properties.Settings.Default.AnnouncementUrl;
            System.Net.WebRequest feedRequest = 
System.Net.WebRequest.Create(url);
            feedRequest.UseDefaultCredentials = true;
            Rss20FeedFormatter formatter = new Rss20FeedFormatter();
            try
            {
                System.Xml.XmlReader feedReader;
                using (System.Net.WebResponse feedResponse = 
feedRequest.GetResponse())
                using (System.IO.Stream feedStream = 
feedResponse.GetResponseStream())
                {
                    feedReader = System.Xml.XmlReader.Create(feedStream);
                    formatter.ReadFrom(feedReader);
                }
                return formatter.Feed.Items;
            }
            catch (XmlException ex)
            {
                // swallow exception
            }
            return null;

Regards,

Bibhakar Saran
Readify | Senior Developer

M: +61 411 203 036 | W: www.readify.net<http://www.readify.net/>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com

No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.11/1422 - Release Date: 8/05/2008 
17:24 PM
------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com



------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.

Powered by mailenable.com

<<inline: image001.png>>

Reply via email to