.NET Framework Class Library  

WebClientProtocol.Timeout Property

Indicates the time an XML Web service client waits for a synchronous XML Web service request to complete (in milliseconds).

[Visual Basic]
Public Property Timeout As Integer
[C#]
public int Timeout {get; set;}
[C++]
public: __property int get_Timeout();
public: __property void set_Timeout(int);
[JScript]
public function get Timeout() : int;
public function set Timeout(int);

Property Value

The time out, in milliseconds, for synchronous calls to the XML Web service. The default is 100000 milliseconds.

Remarks

Setting the Timeout property to Timeout.Infinite indicates that the request does not time out. Even though an XML Web service client can set the Timeout property to not time out, the Web server can still cause the request to time out on the server side.

Example

[Visual Basic, C#, JScript] The following example sets the Timeout value to 15000 (15 seconds) for the synchronous call to the Add XML Web service method within the Math XML Web service.

[Visual Basic] 
math.Timeout = 15000


[C#] 
math.Timeout = 15000;


[JScript] 
math.Timeout = 15000

[C++] No example is available for C++. To view a Visual Basic, C#, or JScript example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

WebClientProtocol Class | WebClientProtocol Members | System.Web.Services.Protocols Namespace