?
Solved

Using RSS Feeds

Posted on 2008-11-09
3
Medium Priority
?
1,718 Views
Last Modified: 2012-05-05
I'm trying to use an rss feed on my asp.net website but can't get it to work. Here is the code behind the webpage:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        rssPosts.DataSource = GetRSSFeed("http://www.thepittsburghchannel.com/news/topstory.rss")
        rssPosts.DataBind()
    End Sub

    Protected Function GetRSSFeed(ByVal strURL As String) As DataTable
        'Get the XML data
        Dim reader As XmlTextReader = New XmlTextReader(strURL)

        'return a new DataSet
        Dim ds As DataSet = New DataSet()
        ds.ReadXml(reader)
        Return ds.Tables(2)
    End Function

The result when I run this is an error: A column named 'category' already belongs to this DataTable: cannot set a nested table name to the same name.

I've tried many different rss feeds and all give the same result.

Any help would be greatly appreciated.
0
Comment
Question by:stullhe104
  • 2
3 Comments
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 22920102
Hi stullhe104,
Perhaps you can use online Feed Validator to check the existing RSS file:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.thepittsburghchannel.com%2Fnews%2Ftopstory.rss
0
 

Accepted Solution

by:
stullhe104 earned 0 total points
ID: 22921067
Thanks for the post. It does show that the rss feed is valid but that didn't help solve my problem.

I solved the problem by using RSSToolKit which I found at:
http://www.codeplex.com/ASPNETRSSToolkit

0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 22947046
Hi stullhe104,
Ok, you may request admin to refund the points since you already found your own solution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question