Handling Web Reference timeouts

Handling Web Reference timeouts

  
Hello all

I'm currently trying to handle the timeout that the platform generates when executing a WS request to other system.

In my case I have a 300 seconds timeout to a certain method and I want to be catch the exception when the thread is being aborted due to the timeout.

Since this is a platform induced error I'm always getting the "Thread was being aborted" outcome: 
http://servername/customHandlers/internalerror.aspx?aspxerrorpath=
There was an error processing your request. Please try again later...

This is a problem, since the user will think that there is a problem with my application instead of the remote system, which is not the case.

Is it at all possible to contain the timeout errors from the platform?
Hi Pedro,

The problem is that the default page timeout of a page is 110seg. You can change that value globally if you search a bit online, but please don't do that.
So, the page timeout is hitting you before the timeout of the web service.

Before telling you how to "fix" it, let me ask you one thing: is it acceptable for an end-user to wait 300seg for a page response?
Usually a system that requires long waits from external systems you should "hide" this wait times by doing it asynchrounously in Timers (where you can easily control the timeouts). Showing to the users some kind of "processing" state.

Now .. if it's really acceptable to make the user it wait for that, there is an action in HttpRequestHandler extension to override the timeout during a request. You can call it before the WS call to increase the limit.


Regards,
João Rosado
João Rosado wrote:
....

Usually a system that requires long waits from external systems you should "hide" this wait times by doing it asynchrounously in Timers (where you can easily control the timeouts). Showing to the users some kind of "processing" state.

....

 
 
 Hello, 

What's the best way to show to the users that "processing state"?

I have a similar problem. In my case its a very complex action that (many times) takes more than 110 secs to complete. I already try to reduce the complexity of the action but with no significant success.


Best regards
Eduardo Luís