How to cancel a web service call if it's not responding

Posted by drizzle on Stack Overflow See other posts from Stack Overflow or by drizzle
Published on 2010-04-08T19:29:30Z Indexed on 2010/04/08 19:33 UTC
Read the original article Hit count: 291

Filed under:
|
|

Hi,

I have a web page (.aspx) that calls a third party web service to get some data. It usually takes couple of seconds to get the response back, and then the rest of the page will load. Occasionally the call gets stuck either due to the web service is down, or internet connection, etc., the page just hang there and will not load.

My questions is:

1) Is there a way to abort/cancel the web service call after a set amount of time?

2) Is it even possible to verify the status of the web service before calling it?

Thanks.

© Stack Overflow or respective owner

Related posts about web-services

Related posts about c#