PDA

View Full Version : [CLOSED] Running very long functions on CodeBehind



Jurke
Mar 27, 2020, 12:59 PM
Hi
What is best practice for running a function asynchronous that takes a really long time, maybe 30-60min.
It does not need to return anything when it finish, but the process needs to run from the code behind.
And not block any other calls made from client to code behind while running.

Thanks
Mikael

geoffrey.mcgill
Mar 27, 2020, 6:37 PM
How about running a timer on the client and polling the server every minute or so? I would not rely on any connection staying open for that long. Anywhere along pipeline, the connection could time-out, such as in the browser. Polling an endpoint seems like a much safer approach.

Hope this helps.

Jurke
Mar 30, 2020, 3:39 PM
Hi
Thanks for your reply, Ill try that.

Regards
Mikael