WebRequest.Abort Method

Cancels an asynchronous request to an Internet resource.

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


Exception Type Condition
NotSupportedException Any attempt is made to access the method, when the method is not overridden in a descendant class.


The Abort method cancels asynchronous requests to Internet resources started with the BeginGetResponse method.

Note   The WebRequest class is an abstract (MustInherit in Visual Basic) class. The actual behavior of WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create method. For more information about default values and exceptions, see the documentation for the descendant classes, such as HttpWebRequest and FileWebRequest.


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, Common Language Infrastructure (CLI) Standard

See Also

WebRequest Class | WebRequest Members | System.Net Namespace