Long running web method.

A

Archana

Hi,
I want to clarify one thing regarding running long running web method
asynchronously.

I am having one web method with is executing one stored procedure.

This stored procedure is long running may be taking couple of hours.

So want i want is once client has invoke this method asynchronosuly, if if
my client(i.e windows application) is close it should be in running state.

This is working fine.

But my question is will be create any resource leaks or memory leaks if
client has closed before web request completed.

If yes then please tell me alternative for this, i.e how to start
asynchronous web method irrespective of clients availablity once client has
invoked this.

Please correct me if i am wrong.

Thanks in advance.
 
R

Rolf Ruisinger

You could splitt it into 2 different methods one for starting the long
running activity and getting a result ID from the DB, an other one for
looking if the long runner has completed using the ID and if has finished,
getting the result.
Polling for the second methode with a timer, and storing the result to a
result table would make the whole thing total independent from any user
side condition.
The result table could be very simple with ID, bool isReady and a result
field of the data type You want to get (like table_name for a temp result
table)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top