ASP.NET - RSS Reader like google reader

Asked By Sat Sat on 02-Mar-09 07:21 AM

Hi.
 I have created RSS reader but it only reads current 20 or 10 posts
for e.g.
  if I pass this url http://www.eggheadcafe.com/rss_pheedo.xml 

to my RSS Reader application it only reades first 20 articles.

But If i pass the same to Google Reader it reads all previous and current feeds.

How it is capable of doing so ? Can someone sahde some lights on it ?

Thanks,Satalaj

re

Web Star replied to Sat Sat on 02-Mar-09 07:29 AM
http://www.asp101.com/articles/john/megatokyo/dotnet.asp

Nothing like that

Sat Sat replied to Web Star on 02-Mar-09 07:45 AM
you didn't get my problem.
 I want read all feeds programatically like Google Reader reads.

RSS Reader like google reader

mv ark replied to Sat Sat on 02-Mar-09 07:49 AM
How are you fetching the feeds?It could be possible that the method/component you are using the fetching the feeds is restricting the number of posts.

Check this code sample for fetching feeds using Microsoft's ASP.NET RssToolkit Version 2.0 -
http://www.eggheadcafe.com/tutorials/aspnet/c3ed5bbb-0967-46ee-87e9-810fc9b21a3c/aspnet-rssatom-feedread.aspx
Google Reader
Sat Sat replied to mv ark on 02-Mar-09 08:18 AM

Hi.
 If you observed how Google reader reads the RSS you will get my problem.
While scrolling down using Google reader it reads previous posts or Feeds.

below is my code 

for e.g.
 
  string url = http://www.eggheadcafe.com/rss_pheedo.xml;

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);

            HttpWebResponse resp = (HttpWebResponse)req.GetResponse();

            XmlDocument doc = new XmlDocument();
            doc.Load(resp.GetResponseStream());

Then I have applied appropriate namespace.
I'm only able to read current 20 articles post or feed. I want to read previous posts also
Can you tell me how can I read the previous feeds or posts ?

Thanks

Satalaj

RSS REader not Creator or generator
Asked By Sat Sat on 02-Mar-09 08:26 AM
Sendo X,
 I want To create Reader like Google Reader not RSS Generator or RSS Creator. Please read original post.
Thanks for your time

-Satalaj
Read this.
[)ia6l0 iii replied to Sat Sat on 02-Mar-09 09:44 AM

I guess you are hitting only on the Viewable feeds per page (which some sites have restricted to 20)

However, below version of code, reads all (26 currently)

I dont know who is the original author of this. But i rarely modified it to use it.

class app {

const string feedUrl = "http://+:8086/csharpfeeds/";

static IEnumerable<XElement> GetItems() {

string[] feeds = {

"http://www.eggheadcafe.com/rss_pheedo.xml"

};

foreach (var str in feeds) {

var feed = XDocument.Load(str);

var items = feed.Root.Element("channel").Elements("item");

foreach (var item in items)

yield return item;

}

}

static XElement GetReplyBody() {

return new XElement("rss",

new XAttribute("version", "2.0"),

new XElement("channel",

new XElement("title", "C# Geeks"),

new XElement("link", feedUrl),

new XElement("description", "C# Team Members"),

new XElement("generator", "LinqToXml-based RSS aggregator"),

GetItems().ToArray()

));

}

//User may need to be an Administrator to run this application

static void Main() {

var listener = new HttpListener();

listener.Prefixes.Add("http://+:8086/csharpfeeds/");

listener.Start();

// Open a browser pointing at the feeds being served.

string uri = @"http://localhost:8086/csharpfeeds/";

System.Diagnostics.Process browser = new System.Diagnostics.Process();

browser.StartInfo.FileName = "iexplore.exe";

browser.StartInfo.Arguments = uri;

browser.Start();

// Serve requests.

while (true) {

var context = listener.GetContext();

var body = GetReplyBody();

context.Response.ContentType = "text/xml";

using (XmlWriter writer = new XmlTextWriter(context.Response.OutputStream, Encoding.UTF8))

body.WriteTo(writer);

}

}


Reader not feeder
Sat Sat replied to [)ia6l0 iii on 02-Mar-09 10:27 AM
Hi.
 I found that original article here http://msmvps.com/blogs/bill/archive/2007/04.aspx
But I'm not getting what they are trying to say. 
Can you explain

-Satalaj
TRY THIS
C_A P replied to Sat Sat on 03-Mar-09 04:21 AM
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
   <title>ASP .NET 1.x</title>
   <link>http://example.com</link>
   <description>Everything you ever wanted to know about ASP .NET 1.x.</description>
   <copyright>Copyright 2007. All rights reserved.</copyright>

   <item>
     <title>An Extensive Examination of the DataGrid Web Control: Part 1</title>
     <description>A DataGrid control article series that will span several weeks.</description>
     <link>http://www.example.com/Articles/default.aspx?articleid=2</link>
   </item>
   <item>
     <title>.Net Data Caching</title>
     <description>In simple terms data caching is storing data in memory for quick access.</description>
     <link>http://www.example.com/Articles/default.aspx?articleid=3</link>
   </item>
  </channel>
</rss>

SOURCE FROM : http://knol.google.com/k/erich-peterson/personalizing-rss-feeds-with-aspnet-20/226vto3111gt2/7#
TRY THIS LINK
C_A P replied to Sat Sat on 03-Mar-09 04:27 AM

http://www.webdevbros.net/2007/07/01/asp-vbscript-rss-readerwriter-class/

http://www.geekpedia.com/tutorial157_Create-an-RSS-feed-using-ASP.NET-2.0.html

http://digg.com/programming/How_to_create_a_simple_RSS_feed_reader_in_ASP_NET

http://www.dcs-media.com/desdev/developers/how-to-build-your-own-ajax-rss-reader.aspx

http://www.programmerfish.com/how-to-create-simple-rss-feed-reader-in-aspnet

 

C# Build application like google reader
Sat Sat replied to C_A P on 03-Mar-09 06:42 AM
Hi.
 Nothing worked for me.
 I want to built complete apllication like google Reader. which will read all posts or feeds provided by RSS
All new and old posts I should be able to read programatically.

Satalaj