views:

234

answers:

2

Hi all. Thanks in Advance for reading and answer this question.

I got button in asp 2.0 that will process something BIG. It will take sometime to finish (more than 30,000 comparison) and I want to know if the browser says that it lost the comunication with the server, the server will finish the process?

A: 

You should not execute this button live on the site but instead spawn a thread server side.

You could use AJAX to tell the services to start the comparison and listen for the answer later on.

NPayette
Thanks. Right now I got the button which call the function with one parameter and then do all the process. So how it would looks like with thread?
GutierrezDev
+1  A: 

You probably want to modify your architecture so that the HTTP response is not dependent on the processing finishing within the timeout period. It sounds as if you are not going to tell the user anything based on the results of the calculation anyway based on the question. There are different methods you could use, but most involve writing a message to a queue, and then having a separate process, like a Windows Service monitor that queue and do the long running work separately.

Nick
cool. I dont need to show any message to the user (It will send an email in background with the data CVS file). So I Should use? Thread? Backgrounder?
GutierrezDev
You could use a thread, the BackgroundWorker class, MSMQ with a separate monitoring service, or more that I'm not thinking of.
Nick
Thanks man. Right now I just exported the code to Console Application. It last ~8-9 hours to finish but It worked. Thanks for your info.
GutierrezDev