Timeout on slow WebService Calls in C#
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 开发者_StackOverflow社区with some code examples on how to do this?
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.
精彩评论