An exception occurred in the client script. Error: The connection to the server was..

I'd like to have the server side execute long processing that takes 100 seconds or more by pressing the Ajax Submit button on the client side.

However, in case of such long processing, the error "An exception occurred in the client script. Error: The connection to the server was reset. Server returned status error" occurs.

As a solution to this problem, I know that changing the process from Ajax Submit to Submit will prevent errors, but I would like to use Ajax Submit for clients with long processing, so I want to display the progress icon.
Is there a good way to do this? I changed "executionTimeout", but there was no effect.

Hi Dany,

What I do on this long processing is I save all the info on a table with a status inprogress. I use a timer to make all the process and when it finish I change the status. And I keep checking in the frontEnd if the status change. While it didn't change I show a progress icon.

Hope this helped.



It will be hard to give recommendation if we don't know what's behind the Ajax Submit button. Maybe a stack trace could help from the service center? It looks like though the error message you've shared relates to server timeouts.

I am carrying out long processing in the Extension, but I could not find a stack trace in the service center. Since this problem does not occur if it is within 100 seconds or so, I think it is a problem of server timeouts.

Hi Dany,

First, avoid setting the executionTimeout in IIS since it will affect all requests. It can end up in odd behaviors for end users. If you want to set the timeout for a single request use the setTimeout action from HttpRequestHandler instead.

Second, do you really need to execute such a long request synchronously? Check Marcelo's approach: you can do better control of your flow (e.g. error handling, retries, etc) and  improve the user experience.


Thank you all!

The processing that I want to execute is not necessarily long time, it may end shortly.
If I use a timer, there is a possibility that processing start may be delayed up to 20 seconds, so I am worried about this.
However, since asynchronous processing is a good way, I will consider using a timer.