.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Randomise RSS feed?

Posted By:      Posted Date: October 17, 2010    Points: 0   Category :ASP.Net

Hi there, not sure if this code exists anywhere, but i am after some code i could build on that would retrieve an rss feed, parse it, then display the items in the feed in a random order. Eventually i would need to parse multiple rss feeds and randomise all items, but i can build this functionality on if i have the code to start with.

Does anyone know of some starting point i could use that is in VB?




View Complete Post

More Related Resource Links

Consuming an RSS Feed


I'm looking to make a user control to display the 3 most recent posts from a blog on my home page. I've googled around a bit and found a few ways to do this, but none I'm quite satisfied with.

I looked at the XMLDataSource control, but I'm concerned about exception handling. If the remote feed fails, I want to just hide the usercontrol and let the rest of the page display as normal. There seems to be no clean, declarative way to handle this. An OnError event would be nice, especially if it had an e.ExceptionHandled property on the EventArgs object like some of the other DataSource classes.

Scott Guthrie blogged about an RSS Toolkit for .net 2, but that was four years ago and hasn't been updated.

I'm leaning towards Linq to XML, which would probably work fine, but I can't help thinking that there must be a simpler approach to reed RSS feeds since it's such a common problem.



Generate rss feed with HTTPHandler





I'm looking for link/tutorials/code samples on How to create HttpHandler for generating rss feeds for a website.




Unable to read my RSS feed with XmlReader



I have an RSS-feed page, which I developed with SyndicationFeed class. The page seems to work, and if I type the url into a browser, a page similar to this opens up: http://msdn.microsoft.com/en-us/magazine/rss/default.aspx

However, I'm unable to read the feed into an XmlReader object. Let's say my rss page is "http://mysite/rss.aspx", and my code in the rss-retriever side is something like this:

XmlReader reader = XmlReader.Create("http://mysite/rss.aspx");

XmlDocument doc = new XmlDocument();


I get an error on doc.Load(reader) method:

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method

I've tried to set the ProhibitDtd to false, but then I get some other error.

If I put something like this, I can save the xml dat into a file, and I can see that it's just like it should be:

XmlReader reader = XmlReader.Create("http://mysite/rss.aspx");

SyndicationFeed feed = new SyndicationFeed();

SharePoint 2010 RSS Feed and Outlook Error

When I added an RSS feed from SharePoint 2010 it showed up in IE just fine. When attempting to add the RSS feed whithin outlook, i recieved this error "outlook cannot process the content from http://****.com (the web site) the link may not point to a valid source" Any thoughts?

Displaying Images in an RSS feed web part

I have an RSS feed with images. the rss web part doesnt seem to show me these images only the text. its on moss 2007. is there anyway to get these images displaying in the feed. thanksSharepoint Customiser

putting carriage return/line feed in non-HTML email text

Using vb.net/asp.net 2005I am trying to create a string message for an email that I am sending out from my asp.net page like so: For Each dr In dtDataTable.Rows strMessage = strMessage & vbCrLf & vbCrLf & Environment.NewLine & dr.Item("UserName") & Environment.NewLine Next so I am looping through a datatable and getting each name from each row, that is working well but when I get the email it appears in my inbox with all the names mashed together, you see I am trying both vbcrlf and newline but looks like neither is workingdoes anyone know what I'm doing wrong?

bbc news rss feed

Im trying to link my site to the bbc uk news rss feed to display the headlines on my page with links to the bbc news site I know I need to pull the feed into an xml file and then display this data on my web page I'm thinking of making a control for the display and add the control to my home page can anyoen help me with this of send me a link on how to do it cheers 

Consuming RSS Feed using ASP.NET

 i'm trying to consume RSS Feed using ASP.NET with c# as followsConsuming RSS Feed using ASP.NET   <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"><title>RSS Feed</title> </head> <body> <form id="form1" runat="server"> <div> <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile=http://feeds.feedburner.com/mathrubhumiXPath="rss/channel/item"></asp:XmlDataSource> </div> <asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1" BackColor="White" BorderColor="#404040" BorderStyle="Solid" GridLines="Vertical"> <ItemTemplate> <%#XPath("title")%><br /> <%#XPath("pubDate")%><br /> <%#XPath("author")%><br /><%#XPath("description")%> </ItemTemplate> </asp:DataList> </form> </body> </html>  &nb

XML Viewer web part and SharePoint list RSS feed doesn't work

Hello, When I want to use the XML Viewer web part and set the XML URL to an RSS feed from a SharePoint list I get this error: Cannot retrieve the URL specified in the XML Link property. For more assistance, contact your site administrator. The URL I'm trying looks like this: http://sp2010/_layouts/listfeed.aspx?List=%7B76FD9EEE%2D9354%2D444E%2DBE3C%2DA9AE2C4B2063%7D I've seen blogpost that discuss this and they say that this is because of a security issue and that I have to enable anonymous access in order to display the RSS feed. Is this the only option there is ? I don't want to enable anonymous access on my SharePoint site. Why can't SharePoint just request the RSS feed with the credentials of the logged in user ? Or am I missing something here?

Adding RSS feed to website

Hi, I'm a bit of a noob to RSS and would like to know how I can add a BBC sports feed to my website please. The feed is at: http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml Can anybody please let me have the code for this in C# ASP.NET? I would like the articles displayed as one line links if possible. Thank you in advance Dan

Add RSS feed to existing calendar

I'm the admin for sharepoint at a university.  we have several depts and centers using workflow to populate their local calendars as well as a main school-wide calendar.  One of the centers, however, is offsite and already has a calendar platform that they want to use and most likely will not change, this calendar does have an RSS feed. So I'm wondering if anyone has tried to populate a sharepoint calendar with events from within sharepoint, as well as from one additional outside source, in this case, RSS?  I'd like to be able to display all events on our school wide calendar regardless of whether the center is in sharepoint or whether they are off site.   Thanks

RSS feed - Web request fails in 4.0 whereas it works in 3.5

I am trying to get RSS feed from Microsoft blogs thro' web proxy. The Web request fails in .net 4.0 whereas all work fine in .net 3.5... Anything extra to be done in 4.0 while sending the credentials to proxy? Please help me. Code: namespace     testrssfeeder {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window {     public MainWindow() { InitializeComponent();     AuthenticationManager.CredentialPolicy = new Proxycredentials (); }     private void Window_Loaded(object sender, RoutedEventArgs e) {     XmlTextReader rssReader;     XmlDocument rssDoc;     Uri httpSite = new Uri("http://www.microsoft.com/communities/rss.aspx?&Title=Blogcasts&CMTYSvcSource=MSCOMBlogPosts&CMTYRawShape=list&Params=%7eCMTYDataSvcParams%5e%7eArg+Name%3d'DateFormat'+Value%3d'MMM+d%2c+yyyy'%2f%5e%7eArg+Name%3d'CategoryGuid'+Value%3d'b286f1d2-c540-405f-abb8-c386d4815f32'%2f%5e%7e%2fCMTYDataSvcParams%5e&NumberOfItems=50");     // Create the request object.     WebRequest wreq = WebRequest.Create(httpSite); wreq.Credentials =   CredentialCa

Custom activity feed.

I am trying to implement activity feed functionality for SharePoint sites. User should be able to follow activities (document added, delete etc.) on multiple SharePoint sites by subscribing to it. All sites are available for all authenticated users. Users have the option of unsubscribing to it at any time. I know that I can add custom activities. The question that I have is how can I publish these events to only users who have subscribed to the site. There are about 50K users. Does SharePoint 2010 provide any mechanism for storing who has subscribed to what site and use that to publish the events?

Unable to sort RSS feed in Web Part or SP Designer 2007

I have an RSS Moss 2007 webpart to display feeds from http://www.fujitsu.com/uk/news/pr/uk-news-pr-rss.rss but the feed is coming in reverse date order. In Sharepoint designer when I try to sort by pubDate (descending), the sort order is arbitrary and it appears that the feed is being limited in size with the latest post being some 3 years ago.

Any help would be appreciated.

Disable a Specific News Feed Activity Using the Client Object Model


Hello and thanks for reading. I've been working with the out-of-box SharePoint 2010 News Feed portion of My Sites, and I am planning to deploy it to many users.

I am building a console application which will iterate through all of the my sites currently in the system and un-check one of the "Activities I am following' for each user. I have used the example provided at this link(MSDN) to come up with the following code:


 Public Class ChangeActivity

 'Reference: http://msdn.microsoft.com/en-us/library/ff426883.aspx'

 Public Shared Sub ChangeActivityProperties()

		Using siteCol As New SPSite((My.Application.CommandLineArgs(0)))

					Dim context As SPServiceContext = SPServiceContext.GetContext(siteCol)

					Dim profileManager As New UserProfileManager(context)

					Dim profile As UserProfile = profileManager.GetUserProfile("THEDOMAIN\username")

					Dim activityMan As ActivityManager = New ActivityManager(profile, context)

					'Create an instance of a list of ActivityPreferencePerType objects.'

					Dim activityPrefsPerType As New List(Of ActivityPreferencePerType)(activityMan.ActivityTypes.Count)

Ops manager RSS feed - Error 401


Hi All,

I'm currently building an internal dashboard for the IT support team. One of their requirements is to have an RSS feed from Ops Manager running on another server. I've added the below code, but when I run the aspx page in browser, I get a 401: Unauthorised error on the ds.ReadXml(Reader) line.

    Function GetRSSFeed(ByVal strURL As String) As DataTable
        'Get the XML data
        Dim reader As XmlTextReader = New XmlTextReader(strURL)
        'return a new DataSet

Activity feed not showing tag items...



I'm trying to get activity feed to show items that I've tagged. Its not showing up on my colleagues' newsfeeds. The news feeds are only showing profile changes... Any idea why?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend