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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:28:54+00:00 2026-05-11T00:28:54+00:00

I have an application where I need the user to upload a photo. After

  • 0

I have an application where I need the user to upload a photo. After the photo is uploaded to the server, which shouldn’t take very long, the user should get back a response that’s a regular HTML page saying ‘thanks…bla bla bla…’
Now, after the the response is sent back to the client and he goes on his merry way, I want the server to continue to work on this photo. It needs to do something that’s heavy and would take a long time. But this is okay because the user isn’t waiting for anything. He’s probably in a different page.
So my question is, how do I do this with ASP.NET. The application I’m writing is in ASP.NET MVC so I’m imagining something like

//save the photo on the server //and send viewdata saying 'thanks...' return View(); //keep doing heavy processing on the photo 

But I guess this isn’t really how it’s done. Also, since sometimes I work with ASP.NET WebForms, how is this done with WebForms as well.
Thank you!

  • 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. 2026-05-11T00:28:55+00:00Added an answer on May 11, 2026 at 12:28 am

    We do this for a lightweight logging situation:

    Action<object> d = delegate(object val) {     // in this anonymous delegate, write code that you want to run     ProcessDataAndLog(); };  d.BeginInvoke(null, null, null); // this spins off the method asynchronously. 

    It’s by no means robust. If you need a guarantee of being processed you should consider a message queue. That way you can also offload processing to a separate machine and not bog down your web server.

    EDIT:

    The following also works, and is perhaps a little more obvious to your fellow coder. It’s essentially the same, but apparently faster and you don’t need to worry about calling EndInvoke().

    System.Threading.ThreadPool.QueueUserWorkItem(     delegate(object state)     {         // in this anonymous delegate, write code that you want to run         ProcessDataAndLog();     }); 

    Further Reading: The Thread Pool and Asynchronous Methods and Asynchronous delegate vs thread pool & thread and Does not calling EndInvoke really cause a memory leak ?

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

Sidebar

Related Questions

I have a client server application in which I need to transmit a user
I have a simple application in which I need to let the user select
I have a windows phone application and I need to add a user control
I have a web application inside where i need to check whether the user
I have 2 Java EE applications which need to share some common user related
We have developed a web application which consumes a web service. The user will
I have an application that allows a user to upload a certificate and attach
I need to create an application dll, script or exe which when the user
In our application, we allow user to upload documents which can be PDF, Doc,
I am working on a Django application which allows a user to upload files.

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.