开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜