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

  • Home
  • SEARCH
  • 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 3235242
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:29:03+00:00 2026-05-17T17:29:03+00:00

I have to start a thread to do some long running task in the

  • 0

I have to start a thread to do some long running task in the background (even if the browser is closed) without waiting for a response on a button click event of a web page.

I also need to be able to stop that later if the user wishes to do so.

How can I do this?

Is it possible to store the id of the thread in database and abort it later?

Do I need to make an asynchronous webservice OR wcf call to achieve this?

How can I stop the long running task later if required in that case?

Thanks in advance.

  • 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-17T17:29:04+00:00Added an answer on May 17, 2026 at 5:29 pm

    I suggest that your ASP.Net app write requests to a database table, and handle those requests with a Windows service.

    I would use one table to queue new tasks and a separate table to manage running tasks. This second table can be used to report progress or kill a running task. Once tasks complete you can move them to a third table long with summary data for later analysis.

    The database also gives you persistence, so if the server crashes the Windows service can provide automatic restart of the tasks without requiring the user to resubmit them.

    If you have lots of queued tasks, you can spawn Windows services on multiple application servers to speed things up, all controlled through the database.

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

Sidebar

Related Questions

I have a scenario when I start 3..10 threads with ThreadPool. Each thread does
I have a start of a webapp that I wrote without using the Object
I have an object that starts a thread, opens a file, and waits for
I have C# winforms application that needs to start an external exe from time
I have a Perl hash whose keys start with, or are, numbers. If I
I have an .exe I want to start when the Win2k3 server boots. Does
I have a series of ranges with start dates and end dates. I want
I have a project that I would like to start beta testing soon, it
I have a file in the following format: Data Data Data [Start] Data I
I have some database table and need to process records from it 5 at

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.