Suppose that upon button click in my web form, a process will take 5 minutes to complete. So, I am trying to delegate the task to a different thread like so:
protected void btnSubmit_Click(object sender, EventArgs e)
{
Thread t = new Thread(()=> DoTheTimeConsumingJob());
t.Start();
}
And here is the method DoTheTimeConsumingJob:
private void DoTheTimeConsumingJob()
{
... ...
Session["funkie"] = myFunkieObject;
... ...
}
This will not work because the new thread knows nothing about Session.
So how would you make use of Session in a different thread in asp.net? Thank you.
...
Go to the complete details ...