Click here to Skip to main content
14,329,474 members

RSS Feed Server

Rate this:
1.42 (19 votes)
Please Sign up or sign in to vote.
1.42 (19 votes)
11 Mar 2008CPOL
Creating a RSS Feed Server using .Net

RSS FEED SERVER - (Explained !!)
(For all the girls who needed explaination)

Download RSSFeedService.zip - 899.12 KB

Introduction

RSS Feed Server allows organizations and individuals who are behind firewall and proxy. And in many cases users tend to not have internet access in different organizations. But for intranet or any other application they are using, if they want to subscribe to RSS, this server will help you expose those rss feeds from internet to your local users who dont have internet access.

Application Structure

image001.gif

As can be seen from above, corporate which have policy to restrict users from going on to internet will be of interest to this application design.

It has 2 major components

  • RSS Feed Service
  • RSS Feed Controller

The service simply put has 2 major roles. First it reads off a table list of URL of RSS Feeds. It pulls it down from internet and save it on a shared virtual folder of an IIS Server Hosted. This enables the users not having internet to consume RSS virtually over the internet. Feed Controller helps to start and stop the service.

Class Diagram

image003.gif

How to use

The first thing you need to do is create a table in the database.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE dbo.RSSFeeds(FeedID numeric(18, 0) IDENTITY(1,1) NOT NULL,FeedURL nvarchar(max) NOT NULL,Category nvarchar(max) NOT NULL
) ON PRIMARY

Then create a IIS Virtual Folder where you need to drop the feeds.

last thing to do is modify the config file below:
<appSettings>
<add key="FilesDrop" value="C:\Inetpub\wwwroot\RSSFeeds\" />
<add key="UserName" value="XXXXX" />
<add key="Domain" value="XXXX" />
<add key="Password" value="XXXXXX" />
<add key="ProxyServer" value="XXX.XXX.XXX.XXX" />
<add key="Port" value="80" />
<add key="AppName" value="Name to be given" />
<add key ="ConnectionString" value= "Data Source=XXX;Initial Catalog=XXX;User Id=XX;Password=XXXX"/>
<add key ="TimerElapsedTime" value="60000"/> /// This is in milliseconds (remove this comment)
</appSettings>

Fill in the table with urls for feeds and there you go !!

Once you have created the table [RSSFeeds] in sql server, then you need to configure the application.config file. Here you will find
<add key="ConnectionString" value="Data Source=XXXX;Initial Catalog=XXX;User Id=XXXX;Password=XXXXX" />

in this you put your datasource as database server, initial catalog as database name and username and password

then create virtual folder in ur iis

give the physical path in app config

<add key="FilesDrop" value="C:\Inetpub\wwwroot\RSSFeeds\" />

remember: in table, the column name "Category" is going to be the name of the file generated in ur drop folder i.e. news.xml. its just i named the column wrong you can change it to "filename".

Do look into public void FetchXML() in rssfeeds.cs file in the rssfeedservice project.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Arif Habib Shadan - www.i-arif.com
Architect www.i-arif.com
Pakistan Pakistan
Working as solution architect. Developing solutions based on Microsoft based Technologies.
Have my own blog at
www.i-arif.com

Comments and Discussions

 
GeneralReported Pin
NormDroid22-Jan-08 0:23
professionalNormDroid22-Jan-08 0:23 
Generalwow...a new record Pin
jconwell3-Jan-08 5:21
memberjconwell3-Jan-08 5:21 
GeneralRe: wow...a new record Pin
Arif Habib Shadan - www.i-arif.com3-Jan-08 13:09
memberArif Habib Shadan - www.i-arif.com3-Jan-08 13:09 
Smile | :) theres nothing much fancy on programming side of it. Being a developer you can easily see whats going inside the project. standard stuff. Dont want to waste developers time in making them read something they already know, the thing to understand is the approach and need suggestions to optimise it and give more features to it ... would welcome these suggestions as this is something running in my organization and wud love to have more features for the other group developers in my company who are using it.
AnswerRe: wow...a new record Pin
Kiran Somaya7-Jan-08 17:15
memberKiran Somaya7-Jan-08 17:15 
GeneralRe: wow...a new record Pin
CARPETBURNER14-Jan-08 22:30
memberCARPETBURNER14-Jan-08 22:30 
GeneralRe: wow...a new record Pin
NormDroid22-Jan-08 0:24
professionalNormDroid22-Jan-08 0:24 
QuestionHow to access the RSS feeds after inserting them in the sql table Pin
mshehadeh2-Jan-08 20:22
membermshehadeh2-Jan-08 20:22 
AnswerRe: How to access the RSS feeds after inserting them in the sql table Pin
Arif Habib Shadan - www.i-arif.com2-Jan-08 23:11
memberArif Habib Shadan - www.i-arif.com2-Jan-08 23:11 
GeneralRe: How to access the RSS feeds after inserting them in the sql table Pin
olugbe28-May-08 0:53
memberolugbe28-May-08 0:53 
GeneralRe: How to access the RSS feeds after inserting them in the sql table Pin
Arif Habib Shadan - www.i-arif.com28-May-08 1:43
memberArif Habib Shadan - www.i-arif.com28-May-08 1:43 
GeneralRe: How to access the RSS feeds after inserting them in the sql table Pin
olugbe28-May-08 2:20
memberolugbe28-May-08 2:20 
GeneralRe: How to access the RSS feeds after inserting them in the sql table Pin
Arif Habib Shadan - www.i-arif.com28-May-08 22:09
memberArif Habib Shadan - www.i-arif.com28-May-08 22:09 
GeneralRe: How to access the RSS feeds after inserting them in the sql table Pin
Kent397319-Sep-08 8:32
memberKent397319-Sep-08 8:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Article
Posted 2 Jan 2008

Stats

41.3K views
204 downloads
13 bookmarked