Export (0) Print
Expand All

WebClientProtocol.Abort Method

Cancels a request to an XML Web service method.

[Visual Basic]
Public Overridable Sub Abort()
[C#]
public virtual void Abort();
[C++]
public: virtual void Abort();
[JScript]
public function Abort();

Return Value

Abort cancels a synchronous XML Web service request. Since a synchronous request will block the thread until the response has been processed you must call Abort from a separate thread. Calling Abort will cause a WebException to be thrown from the XML Web service method call. The WebException.Status property will have the value WebExceptionStatus.RequestCanceled. To abort an asynchronous call, you need to cast the IAsyncResult returned from the Begin method to a WebClientAsyncResult and call the WebClientAsyncResult.Abort method.

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

See Also

WebClientProtocol Class | WebClientProtocol Members | System.Web.Services.Protocols Namespace | GetWebRequest | GetWebResponse | WebRequest | Abort | WebClientAsyncResult

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft