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