Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8251219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:09:51+00:00 2026-06-08T00:09:51+00:00

in a project I’m working on, a client wants to combine RSS feeds into

  • 0

in a project I’m working on, a client wants to combine RSS feeds into their sites news items.

The site already has a news feed populated by NewsItems pulled from the database.

My idea is to consume the rss feeds periodically (every 20 minutes or so), but I’m unsure what effect this would have on a client attempting to view the news page at the time the feed is being updated.

My idea is to use ThreadPool.QueueUserWorkItem to consume the feed, process it, and add new items to the database/lucene index/add tags etc, but my experience of async programming is pretty much zero.

Would QueueUserWorkItem spawn a new thread to do the work without holding up the clients thread? What would happen when the update ends?

I was thinking of doing something like this:

public class ExternalRSS
{
    private readonly SettingsDTO Settings;

    public ExternalRSS()
    {
        Settings = Application.FetchSettings();

        RunAsynchronously(ProcessFeed);
    }

    public static void RunAsynchronously(Action method)
    {
        ThreadPool.QueueUserWorkItem(i =>
        {
            try
            {
                method();
            }
            catch (ThreadAbortException ex) { /*log*/}
            catch (Exception ex){/*log*/}
        });
    } 

    private void ProcessFeed()
    {
        if(Settings != null)
        {
            using (var reader = XmlReader.Create(Settings.FacebookRssFeed))
            {
                var rssData = SyndicationFeed.Load(reader);

                //do processing etc
            }
        }
    }
}

Am I over complicating the problem?

Any advice would be welcomed!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:09:53+00:00Added an answer on June 8, 2026 at 12:09 am

    This IMHO is not a task that should be done inside an ASP.NET MVC application. I would use a separate dedicated Windows Service that will periodically query the remote RSS feed and update the database. Or a simple console application scheduled to run at regular intervals with the Windows Task Scheduler. The important part is when writing to the database: make sure it is performed inside a SQL transaction. This way the client MVC application won’t see corrupt data when reading it.

    I would also recommend you reading the following blog post in which Phil Haack explains in details why implementing such recurrent background tasks in ASP.NET applications is a very bad idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Project: http://design.vitalbmx.com/fave/news.html When I click Add to favorites button (under main pic), in Chrome
The project that I am working on (Node.js) implies lots of operations with the
Project I'm working on uses jQuery. I have a series of Ajax calls being
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Current project is an Mvc4 application, I had Ioc working and recently it just
The project i am working at right now requires some declarative way of defining
A project I am working on only builds with maven-2.2: for earlier versions, the
Project has_many :items Item belongs_to :project I'm trying to get the projects sorted by
A project I'm working on at the moment involves refactoring a C# Com Object
My project has both client and server components in the same solution file. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.