I am currently running an e-commerce website.
So when the user checkouts, I have a bank callback page...
But as I have to perform a lengthy task after the payment occurs (which is currently done synchronously), the user has to wait a long time before it is redirected back to my site.
I have tried to make a background thread with thread.start but the problem with that is that I loose the session, which is not appreciable.
So, based on this description, how would you proceed? Would you go Async or Multi-Threading?
If you'd go Async, how would it be?
So we have something like:
public ActionResult CallBack()
{
if (AcceptPayment() == "OK")
{
LenghtyTask();
}
return RedirectToUrl("MyWebSite");
}