I got one page where i do some file manipulation, and when file is done, i need to upload to amazon s3. Sometimes file can be large, so user on submit need to wait too much. How can i make something like
Easiest way to do this:
ThreadPool.QueueUserWorkItem(YourUploadMethod);
There is some comment below arguing with this, so I wrote this:
protected void Page_Load(object sender, EventArgs e)
{
ThreadPool.QueueUserWorkItem(YourUploadMethod);
Response.Redirect("http://google.com");
}
public void YourUploadMethod(object state)
{
Thread.Sleep(7000);
}// breakpoint: I was redirected to google and then debugger stopped me here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With