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 6779425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:23:01+00:00 2026-05-26T16:23:01+00:00

Search several blogs about it but always are same examples. I dunno if misunderstood

  • 0

Search several blogs about it but always are same examples.

I dunno if misunderstood or’m not knowing use but see no parallel process when work with AsyncController.

The following tests performed

Create a new project of type Asp.net MVC

HomeController.cs

public void IndexAsync()
{
    AsyncManager.OutstandingOperations.Increment();
    var bg = new BackgroundWorker();
    bg.DoWork += (o, e) => GetEntriesBlog();
    bg.RunWorkerCompleted += (o, e) =>
                                    {
                                        AsyncManager.Parameters["items"] = e.Result;
                                        AsyncManager.OutstandingOperations.Decrement();
                                    };
    bg.RunWorkerAsync();

    ViewBag.Message = "Modify this template to kick-start your ASP.NET MVC application.";

}

public ActionResult IndexCompleted(IEnumerable<SyndicationItem> items)
{
    return View(items);
}

[NonAction]
public IEnumerable<SyndicationItem> GetEntriesBlog(int page = 0)
{
    using (var reader = XmlReader.Create("http://blog.bindsolution.com/rss"))
    {
        Thread.Sleep(20000);
        var rssData = SyndicationFeed.Load(reader);
        if (rssData != null)
        {
            return (from item in rssData.Items
                    orderby item.PublishDate descending
                    select item).Take(3).Skip(3 * page).ToList();
        }
        return null;
    }
}

Always delay 20 seconds browsing the site!

I was thinking of using PartialView AsyncController in to perform this task. Work?

  • 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-05-26T16:23:01+00:00Added an answer on May 26, 2026 at 4:23 pm

    I think you are misunderstanding what the Asynchronous Background worker would do.

    If the operation takes 20 seconds using a background worker will not reduce that time or make the view render any faster. Using an asynchronous operations will free up the worker process on the server to process other requests while this long running request keep chugging along.

    In your case I think you should create a very simple view that returns quickly to the user and kick of the long running operation as an asynch request from the client. For example, render the fast portions of your page (e.g. header, menus, et cetera) and make an AJAX request for the blog entries.

    Depending on the nature of the code in GetEntriesBlog you might not need to make the controller operation asynchronous. In theory, since most of the time in this method will be spend waiting for the HTTP GET request to http://blog.bindsolution.com/rss to complete, it might be a good idea but in practice those things need to be bench marked (and perhaps under heavy load) to make sure you are getting the benefit that you expect. Keep in mind that your server code side will be more complex (and harder to maintain) if you make it asynch. I would suggest you go this route only if you do get a significant benefit.

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

Sidebar

Related Questions

I have several columns that I'd like to search against. My code might not
I'm trying to perform a search-replace in several JCLs but I need multi-line capabilities,
I have search a lot and found several methods about how to call page
I'm trying to use TextPad to search for a regular expression in several files.
I want to search several words at the same time in a text file.
These days I come across several Google search results that contain sites with links
After a several hour (re)search, I just can't come up with a explainable difference
There are several plugin options for building a search engine into your Ruby on
We have a page of search results which the user can hit in several
I have a search-method which returns multiple items, each with several child-properties with references

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.