views:

27

answers:

1

Hi, im calling a webservice with variable response times. I want to be able to "Timeout" the request if a response takes longer than 15 seconds. Meaning, i will move forward in my code, not waiting for the response. Everything is done in C#. Could anyone help me out with some code examples on how to do this?

+1  A: 

Assuming you are using a generated client side proxy, derived from SoapHttpClientProtocol, to invoke the web service (did you add a "Web Reference" to your project?) then there should be a Timeout property on the generated class.

Stuart Davies
Thanks alot! That solved the problem!
matskn
No worries, happy to help :)
Stuart Davies