Last post Aug 17, 2010 08:02 AM by Userr_
Sep 19, 2007 06:58 AM|bedideanil|LINK
Please suggest what is the best approach of coding for RSS implementation,
a) Add custom handler in web.config for .rss type
b) Create a handler class (RSSHandler.cs) in APP_Code
c) Create a Sample.rss file
d) Browse Sample.rss in browser
a) Create RSSUtility classes like (RSSItem.cs, RSSRoot.cs, RSSUtilities.cs, RSSChannel.cs, RSSImage.cs, RSSEnum.cs, RSSItemCollection.cs)
b) Create Sample.xml file
c) When the RSS button is clicked on Default.aspx page, this uses Publish() method in RSSUtilities.cs to read Sample.xml file, and Feed is displayed.
The (Implementation 2) is the typical sample in any RSS samples.
Sep 19, 2007 05:00 PM|kevinkenny|LINK
Implementation 1 would require you to add the .rss extension as a MIME type to the server and you'd also need to map the .rss extension to ASP.NET in IIS. If your deployment environment is a shared web hoster you would probably need to ask nicely to have
this done on your site if the ability to do this is not available in your site control panel.
Implementation 2 is a more practical solution and provider neutral. e.g. have a page called RSSFeed.aspx or implement in a .ashx e.g. RSSFeed.ashx
Sep 20, 2007 04:03 AM|bedideanil|LINK
But even in the Implementation 2, the RSSFeed.ashx is again implenting IHTTPHandler and overriding ProcessRequest(), to render xmloutput.
Please correct me, if we have a FeedGenerator (generates xml file with required RSS format) + Implementation 1, then why do we need to go for Implementation 2.
And if we are considering Implementation 2 as provider neutral, then I think you are refering to different data sources
1) XML file
Consider database as source for RSS Feed for Implementation 2, in this case are we not adding overhead to d/b for fetching feed data wheneve we hit Feed in browser.
Instead if we have a service to generate xml file (feed data) and use Implementation 1, that would be more simpler and scalable, i.e., we just need to add as many .rss (xml files) as per requirement and give a RSS Link in a web page.
I am looking for an optimized and scalable solution, which uses d/b as datasource for RSS Feeds.
Sep 20, 2007 09:01 AM|kevinkenny|LINK
Ok....let me ask a question....where do you plan to host the site? On a shared hoster? or on your own dedicated server where you have admin access to the box and can access the IIS MMC?
I was pointing out that if you're going to use a shared hoster, it's highly unlikely that you'll be able to (or even permitted to) map the .rss extension to ASP.NET. If this is the case and you need your code to be portable without requiring your hoster
to make these kinds of changes then I'd implement using option 2. Yes it's still an HttpHandler but the .ashx extension is actually mapped to ASP.NET in IIS as standard. So you could something like
When you mention "i.e., we just need to add as many .rss (xml files) as per requirement and give a RSS Link in a web page." do you really mean that there will be actual physical files for each type of feed? If you do then all the .ashx handler has
to do is read the correct file based on the querystring parameter squirt it back to the client. It'll scale just as well as having a dedicated HttpHandler for .rss.
If you're bothered about scalability then why not syndicate the feeds via something like FeedBurner?
Aug 17, 2010 08:02 AM|Userr_|LINK
I need to implement RSS for my webApplication and i need to use rss toolkit and follow Implementation 1. I can not find any tutorial or any atricle on how to implement.
would you please help me if you have followed Implementation 1 ?any link you can provide me to show how to create each step??