I am developing a web application in asp.net vb. My current situation is,
I have a main site say abc.com and another site for generating reports depending on certain user ids say xyz.com.
If I click a button on abc.com I have to switch on the generate report page on xyz.com and return to abc.com. xyz.com should generate report and set a flag in database of abc.com.
Currently I am redirecting to the page in xyz.com and add the long running task to queue as follows and redirect back to abc.com.
If ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf LongTimeTask), New Object) Then
Response.Redirect(returnURL)
End If
But the problem is its not dependable. Means some times the queue is executing correctly but some times not. There are no errors in long time task. Just the queue is not executing.
Can any body suggest another best way to do this?
Thanks in advance.
You can create a scheduled tasks or a windows service to execute the report generation / rendering as a background process.