Which timeout are you looking for?
There are 2 actually.
One on a server which makes sure that your WebService method is not running
forever and will be aborted if exceeds some time.
I do not see Timeout property in WebService class.
http://msdn.microsoft.com/en-us/libr...e_members.aspx
You can set/change this time out in web.config See: <httpRuntime
executionTimeout="..."/>
Another one is on a client which makes sure that your client is not waiting
forever for WebService to reply...
The class is actually called SoapHttpClientProtocol and it has a Timeout
property.
George.
转自 http://www.velocityreviews.com/forums/t643044-how-to-set-timeout-for-webservice.html
本文介绍了两种Web服务超时设置方法:一种是在服务器端确保Web服务方法不会永远运行,并在超过指定时间后中止;另一种是在客户端确保客户端不会永远等待Web服务响应。详细解释了如何通过web.config文件中的<httpRuntime>元素来调整服务器端超时时间,并介绍了客户端通过SoapHttpClientProtocol类的Timeout属性来控制等待时间。
6111

被折叠的 条评论
为什么被折叠?



